//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension WAFV2 {
    // MARK: Enums

    public enum ActionValue: String, CustomStringConvertible, Codable, _SotoSendable {
        case allow = "ALLOW"
        case block = "BLOCK"
        case captcha = "CAPTCHA"
        case challenge = "CHALLENGE"
        case count = "COUNT"
        case excludedAsCount = "EXCLUDED_AS_COUNT"
        public var description: String { return self.rawValue }
    }

    public enum BodyParsingFallbackBehavior: String, CustomStringConvertible, Codable, _SotoSendable {
        case evaluateAsString = "EVALUATE_AS_STRING"
        case match = "MATCH"
        case noMatch = "NO_MATCH"
        public var description: String { return self.rawValue }
    }

    public enum ComparisonOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case eq = "EQ"
        case ge = "GE"
        case gt = "GT"
        case le = "LE"
        case lt = "LT"
        case ne = "NE"
        public var description: String { return self.rawValue }
    }

    public enum CountryCode: String, CustomStringConvertible, Codable, _SotoSendable {
        case `as` = "AS"
        case `do` = "DO"
        case `in` = "IN"
        case `is` = "IS"
        case ad = "AD"
        case ae = "AE"
        case af = "AF"
        case ag = "AG"
        case ai = "AI"
        case al = "AL"
        case am = "AM"
        case ao = "AO"
        case aq = "AQ"
        case ar = "AR"
        case at = "AT"
        case au = "AU"
        case aw = "AW"
        case ax = "AX"
        case az = "AZ"
        case ba = "BA"
        case bb = "BB"
        case bd = "BD"
        case be = "BE"
        case bf = "BF"
        case bg = "BG"
        case bh = "BH"
        case bi = "BI"
        case bj = "BJ"
        case bl = "BL"
        case bm = "BM"
        case bn = "BN"
        case bo = "BO"
        case bq = "BQ"
        case br = "BR"
        case bs = "BS"
        case bt = "BT"
        case bv = "BV"
        case bw = "BW"
        case by = "BY"
        case bz = "BZ"
        case ca = "CA"
        case cc = "CC"
        case cd = "CD"
        case cf = "CF"
        case cg = "CG"
        case ch = "CH"
        case ci = "CI"
        case ck = "CK"
        case cl = "CL"
        case cm = "CM"
        case cn = "CN"
        case co = "CO"
        case cr = "CR"
        case cu = "CU"
        case cv = "CV"
        case cw = "CW"
        case cx = "CX"
        case cy = "CY"
        case cz = "CZ"
        case de = "DE"
        case dj = "DJ"
        case dk = "DK"
        case dm = "DM"
        case dz = "DZ"
        case ec = "EC"
        case ee = "EE"
        case eg = "EG"
        case eh = "EH"
        case er = "ER"
        case es = "ES"
        case et = "ET"
        case fi = "FI"
        case fj = "FJ"
        case fk = "FK"
        case fm = "FM"
        case fo = "FO"
        case fr = "FR"
        case ga = "GA"
        case gb = "GB"
        case gd = "GD"
        case ge = "GE"
        case gf = "GF"
        case gg = "GG"
        case gh = "GH"
        case gi = "GI"
        case gl = "GL"
        case gm = "GM"
        case gn = "GN"
        case gp = "GP"
        case gq = "GQ"
        case gr = "GR"
        case gs = "GS"
        case gt = "GT"
        case gu = "GU"
        case gw = "GW"
        case gy = "GY"
        case hk = "HK"
        case hm = "HM"
        case hn = "HN"
        case hr = "HR"
        case ht = "HT"
        case hu = "HU"
        case id = "ID"
        case ie = "IE"
        case il = "IL"
        case im = "IM"
        case io = "IO"
        case iq = "IQ"
        case ir = "IR"
        case it = "IT"
        case je = "JE"
        case jm = "JM"
        case jo = "JO"
        case jp = "JP"
        case ke = "KE"
        case kg = "KG"
        case kh = "KH"
        case ki = "KI"
        case km = "KM"
        case kn = "KN"
        case kp = "KP"
        case kr = "KR"
        case kw = "KW"
        case ky = "KY"
        case kz = "KZ"
        case la = "LA"
        case lb = "LB"
        case lc = "LC"
        case li = "LI"
        case lk = "LK"
        case lr = "LR"
        case ls = "LS"
        case lt = "LT"
        case lu = "LU"
        case lv = "LV"
        case ly = "LY"
        case ma = "MA"
        case mc = "MC"
        case md = "MD"
        case me = "ME"
        case mf = "MF"
        case mg = "MG"
        case mh = "MH"
        case mk = "MK"
        case ml = "ML"
        case mm = "MM"
        case mn = "MN"
        case mo = "MO"
        case mp = "MP"
        case mq = "MQ"
        case mr = "MR"
        case ms = "MS"
        case mt = "MT"
        case mu = "MU"
        case mv = "MV"
        case mw = "MW"
        case mx = "MX"
        case my = "MY"
        case mz = "MZ"
        case na = "NA"
        case nc = "NC"
        case ne = "NE"
        case nf = "NF"
        case ng = "NG"
        case ni = "NI"
        case nl = "NL"
        case no = "NO"
        case np = "NP"
        case nr = "NR"
        case nu = "NU"
        case nz = "NZ"
        case om = "OM"
        case pa = "PA"
        case pe = "PE"
        case pf = "PF"
        case pg = "PG"
        case ph = "PH"
        case pk = "PK"
        case pl = "PL"
        case pm = "PM"
        case pn = "PN"
        case pr = "PR"
        case ps = "PS"
        case pt = "PT"
        case pw = "PW"
        case py = "PY"
        case qa = "QA"
        case re = "RE"
        case ro = "RO"
        case rs = "RS"
        case ru = "RU"
        case rw = "RW"
        case sa = "SA"
        case sb = "SB"
        case sc = "SC"
        case sd = "SD"
        case se = "SE"
        case sg = "SG"
        case sh = "SH"
        case si = "SI"
        case sj = "SJ"
        case sk = "SK"
        case sl = "SL"
        case sm = "SM"
        case sn = "SN"
        case so = "SO"
        case sr = "SR"
        case ss = "SS"
        case st = "ST"
        case sv = "SV"
        case sx = "SX"
        case sy = "SY"
        case sz = "SZ"
        case tc = "TC"
        case td = "TD"
        case tf = "TF"
        case tg = "TG"
        case th = "TH"
        case tj = "TJ"
        case tk = "TK"
        case tl = "TL"
        case tm = "TM"
        case tn = "TN"
        case to = "TO"
        case tr = "TR"
        case tt = "TT"
        case tv = "TV"
        case tw = "TW"
        case tz = "TZ"
        case ua = "UA"
        case ug = "UG"
        case um = "UM"
        case us = "US"
        case uy = "UY"
        case uz = "UZ"
        case va = "VA"
        case vc = "VC"
        case ve = "VE"
        case vg = "VG"
        case vi = "VI"
        case vn = "VN"
        case vu = "VU"
        case wf = "WF"
        case ws = "WS"
        case xk = "XK"
        case ye = "YE"
        case yt = "YT"
        case za = "ZA"
        case zm = "ZM"
        case zw = "ZW"
        public var description: String { return self.rawValue }
    }

    public enum FailureReason: String, CustomStringConvertible, Codable, _SotoSendable {
        case tokenDomainMismatch = "TOKEN_DOMAIN_MISMATCH"
        case tokenExpired = "TOKEN_EXPIRED"
        case tokenInvalid = "TOKEN_INVALID"
        case tokenMissing = "TOKEN_MISSING"
        public var description: String { return self.rawValue }
    }

    public enum FallbackBehavior: String, CustomStringConvertible, Codable, _SotoSendable {
        case match = "MATCH"
        case noMatch = "NO_MATCH"
        public var description: String { return self.rawValue }
    }

    public enum FilterBehavior: String, CustomStringConvertible, Codable, _SotoSendable {
        case drop = "DROP"
        case keep = "KEEP"
        public var description: String { return self.rawValue }
    }

    public enum FilterRequirement: String, CustomStringConvertible, Codable, _SotoSendable {
        case meetsAll = "MEETS_ALL"
        case meetsAny = "MEETS_ANY"
        public var description: String { return self.rawValue }
    }

    public enum ForwardedIPPosition: String, CustomStringConvertible, Codable, _SotoSendable {
        case any = "ANY"
        case first = "FIRST"
        case last = "LAST"
        public var description: String { return self.rawValue }
    }

    public enum IPAddressVersion: String, CustomStringConvertible, Codable, _SotoSendable {
        case ipv4 = "IPV4"
        case ipv6 = "IPV6"
        public var description: String { return self.rawValue }
    }

    public enum InspectionLevel: String, CustomStringConvertible, Codable, _SotoSendable {
        case common = "COMMON"
        case targeted = "TARGETED"
        public var description: String { return self.rawValue }
    }

    public enum JsonMatchScope: String, CustomStringConvertible, Codable, _SotoSendable {
        case all = "ALL"
        case key = "KEY"
        case value = "VALUE"
        public var description: String { return self.rawValue }
    }

    public enum LabelMatchScope: String, CustomStringConvertible, Codable, _SotoSendable {
        case label = "LABEL"
        case namespace = "NAMESPACE"
        public var description: String { return self.rawValue }
    }

    public enum MapMatchScope: String, CustomStringConvertible, Codable, _SotoSendable {
        case all = "ALL"
        case key = "KEY"
        case value = "VALUE"
        public var description: String { return self.rawValue }
    }

    public enum OversizeHandling: String, CustomStringConvertible, Codable, _SotoSendable {
        case `continue` = "CONTINUE"
        case match = "MATCH"
        case noMatch = "NO_MATCH"
        public var description: String { return self.rawValue }
    }

    public enum PayloadType: String, CustomStringConvertible, Codable, _SotoSendable {
        case formEncoded = "FORM_ENCODED"
        case json = "JSON"
        public var description: String { return self.rawValue }
    }

    public enum Platform: String, CustomStringConvertible, Codable, _SotoSendable {
        case android = "ANDROID"
        case ios = "IOS"
        public var description: String { return self.rawValue }
    }

    public enum PositionalConstraint: String, CustomStringConvertible, Codable, _SotoSendable {
        case contains = "CONTAINS"
        case containsWord = "CONTAINS_WORD"
        case endsWith = "ENDS_WITH"
        case exactly = "EXACTLY"
        case startsWith = "STARTS_WITH"
        public var description: String { return self.rawValue }
    }

    public enum RateBasedStatementAggregateKeyType: String, CustomStringConvertible, Codable, _SotoSendable {
        case forwardedIp = "FORWARDED_IP"
        case ip = "IP"
        public var description: String { return self.rawValue }
    }

    public enum ResourceType: String, CustomStringConvertible, Codable, _SotoSendable {
        case apiGateway = "API_GATEWAY"
        case applicationLoadBalancer = "APPLICATION_LOAD_BALANCER"
        case appsync = "APPSYNC"
        case cognitioUserPool = "COGNITO_USER_POOL"
        public var description: String { return self.rawValue }
    }

    public enum ResponseContentType: String, CustomStringConvertible, Codable, _SotoSendable {
        case applicationJson = "APPLICATION_JSON"
        case textHtml = "TEXT_HTML"
        case textPlain = "TEXT_PLAIN"
        public var description: String { return self.rawValue }
    }

    public enum Scope: String, CustomStringConvertible, Codable, _SotoSendable {
        case cloudfront = "CLOUDFRONT"
        case regional = "REGIONAL"
        public var description: String { return self.rawValue }
    }

    public enum SensitivityLevel: String, CustomStringConvertible, Codable, _SotoSendable {
        case high = "HIGH"
        case low = "LOW"
        public var description: String { return self.rawValue }
    }

    public enum TextTransformationType: String, CustomStringConvertible, Codable, _SotoSendable {
        case base64Decode = "BASE64_DECODE"
        case base64DecodeExt = "BASE64_DECODE_EXT"
        case cmdLine = "CMD_LINE"
        case compressWhiteSpace = "COMPRESS_WHITE_SPACE"
        case cssDecode = "CSS_DECODE"
        case escapeSeqDecode = "ESCAPE_SEQ_DECODE"
        case hexDecode = "HEX_DECODE"
        case htmlEntityDecode = "HTML_ENTITY_DECODE"
        case jsDecode = "JS_DECODE"
        case lowercase = "LOWERCASE"
        case md5 = "MD5"
        case none = "NONE"
        case normalizePath = "NORMALIZE_PATH"
        case normalizePathWin = "NORMALIZE_PATH_WIN"
        case removeNulls = "REMOVE_NULLS"
        case replaceComments = "REPLACE_COMMENTS"
        case replaceNulls = "REPLACE_NULLS"
        case sqlHexDecode = "SQL_HEX_DECODE"
        case urlDecode = "URL_DECODE"
        case urlDecodeUni = "URL_DECODE_UNI"
        case utf8ToUnicode = "UTF8_TO_UNICODE"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AWSManagedRulesBotControlRuleSet: AWSEncodableShape & AWSDecodableShape {
        /// The inspection level to use for the Bot Control rule group. The common level is the least expensive. The  targeted level includes all common level rules and adds rules with more advanced inspection criteria. For  details, see WAF Bot Control rule group.
        public let inspectionLevel: InspectionLevel

        public init(inspectionLevel: InspectionLevel) {
            self.inspectionLevel = inspectionLevel
        }

        private enum CodingKeys: String, CodingKey {
            case inspectionLevel = "InspectionLevel"
        }
    }

    public struct ActionCondition: AWSEncodableShape & AWSDecodableShape {
        /// The action setting that a log record must contain in order to meet the condition. This is the action that WAF applied to the web request.  For rule groups, this is either the configured rule action setting, or if you've applied a rule action override to the rule, it's the override action.  The value EXCLUDED_AS_COUNT matches on  excluded rules and also on rules that have a rule action override of Count.
        public let action: ActionValue

        public init(action: ActionValue) {
            self.action = action
        }

        private enum CodingKeys: String, CodingKey {
            case action = "Action"
        }
    }

    public struct All: AWSEncodableShape & AWSDecodableShape {
        public init() {}
    }

    public struct AllQueryArguments: AWSEncodableShape & AWSDecodableShape {
        public init() {}
    }

    public struct AllowAction: AWSEncodableShape & AWSDecodableShape {
        /// Defines custom handling for the web request. For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the  WAF Developer Guide.
        public let customRequestHandling: CustomRequestHandling?

        public init(customRequestHandling: CustomRequestHandling? = nil) {
            self.customRequestHandling = customRequestHandling
        }

        public func validate(name: String) throws {
            try self.customRequestHandling?.validate(name: "\(name).customRequestHandling")
        }

        private enum CodingKeys: String, CodingKey {
            case customRequestHandling = "CustomRequestHandling"
        }
    }

    public struct AndStatement: AWSEncodableShape & AWSDecodableShape {
        /// The statements to combine with AND logic. You can use any statements that can be nested.
        public let statements: [Statement]

        public init(statements: [Statement]) {
            self.statements = statements
        }

        public func validate(name: String) throws {
            try self.statements.forEach {
                try $0.validate(name: "\(name).statements[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case statements = "Statements"
        }
    }

    public struct AssociateWebACLRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource to associate with the web ACL.  The ARN must be in one of the following formats:   For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id     For an Amazon API Gateway REST API: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name     For an AppSync GraphQL API: arn:aws:appsync:region:account-id:apis/GraphQLApiId     For an Amazon Cognito user pool: arn:aws:cognito-idp:region:account-id:userpool/user-pool-id
        public let resourceArn: String
        /// The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.
        public let webACLArn: String

        public init(resourceArn: String, webACLArn: String) {
            self.resourceArn = resourceArn
            self.webACLArn = webACLArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "\\S")
            try self.validate(self.webACLArn, name: "webACLArn", parent: name, max: 2048)
            try self.validate(self.webACLArn, name: "webACLArn", parent: name, min: 20)
            try self.validate(self.webACLArn, name: "webACLArn", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case webACLArn = "WebACLArn"
        }
    }

    public struct AssociateWebACLResponse: AWSDecodableShape {
        public init() {}
    }

    public struct BlockAction: AWSEncodableShape & AWSDecodableShape {
        /// Defines a custom response for the web request. For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the  WAF Developer Guide.
        public let customResponse: CustomResponse?

        public init(customResponse: CustomResponse? = nil) {
            self.customResponse = customResponse
        }

        public func validate(name: String) throws {
            try self.customResponse?.validate(name: "\(name).customResponse")
        }

        private enum CodingKeys: String, CodingKey {
            case customResponse = "CustomResponse"
        }
    }

    public struct Body: AWSEncodableShape & AWSDecodableShape {
        /// What WAF should do if the body is larger than WAF can inspect.  WAF does not support inspecting the entire contents of the body of a web request when the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body are forwarded to WAF by the underlying host service.  The options for oversize handling are the following:    CONTINUE - Inspect the body normally, according to the rule inspection criteria.     MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the request.    NO_MATCH - Treat the web request as not matching the rule statement.   You can combine the MATCH or NO_MATCH settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over 8 KB.  Default: CONTINUE
        public let oversizeHandling: OversizeHandling?

        public init(oversizeHandling: OversizeHandling? = nil) {
            self.oversizeHandling = oversizeHandling
        }

        private enum CodingKeys: String, CodingKey {
            case oversizeHandling = "OversizeHandling"
        }
    }

    public struct ByteMatchStatement: AWSEncodableShape & AWSDecodableShape {
        /// The part of the web request that you want WAF to inspect.
        public let fieldToMatch: FieldToMatch
        /// The area within the portion of the web request that you want WAF to search for SearchString. Valid values include the following:  CONTAINS  The specified part of the web request must include the value of SearchString, but the location doesn't matter.  CONTAINS_WORD  The specified part of the web request must include the value of SearchString, and SearchString must contain only alphanumeric characters or underscore (A-Z, a-z, 0-9, or _). In addition, SearchString must be a word, which means that both of the following are true:    SearchString is at the beginning of the specified part of the web request or is preceded by a character other than an alphanumeric character or underscore (_). Examples include the value of a header and ;BadBot.    SearchString is at the end of the specified part of the web request or is followed by a character other than an alphanumeric character or underscore (_), for example, BadBot; and -BadBot;.    EXACTLY  The value of the specified part of the web request must exactly match the value of SearchString.  STARTS_WITH  The value of SearchString must appear at the beginning of the specified part of the web request.  ENDS_WITH  The value of SearchString must appear at the end of the specified part of the web request.
        public let positionalConstraint: PositionalConstraint
        /// A string value that you want WAF to search for. WAF searches only in the part of web requests that you designate for inspection in FieldToMatch. The maximum length of the value is 50 bytes. Valid values depend on the component that you specify for inspection in FieldToMatch:    Method: The HTTP method that you want WAF to search for. This indicates the type of operation specified in the request.     UriPath: The value that you want WAF to search for in the URI path, for example, /images/daily-ad.jpg.    If SearchString includes alphabetic characters A-Z and a-z, note that the value is case sensitive.  If you're using the WAF API  Specify a base64-encoded version of the value. The maximum length of the value before you base64-encode it is 50 bytes. For example, suppose the value of Type is HEADER and the value of Data is User-Agent. If you want to search the User-Agent header for the value BadBot, you base64-encode BadBot using MIME base64-encoding and include the resulting value, QmFkQm90, in the value of SearchString.  If you're using the CLI or one of the Amazon Web Services SDKs  The value that you want WAF to search for. The SDK automatically base64 encodes the value.
        public let searchString: AWSBase64Data
        /// Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.  If you specify one or more transformations in a rule statement, WAF performs all transformations on the  content of the request component identified by FieldToMatch, starting from the lowest priority setting, before inspecting the content for a match.
        public let textTransformations: [TextTransformation]

        public init(fieldToMatch: FieldToMatch, positionalConstraint: PositionalConstraint, searchString: AWSBase64Data, textTransformations: [TextTransformation]) {
            self.fieldToMatch = fieldToMatch
            self.positionalConstraint = positionalConstraint
            self.searchString = searchString
            self.textTransformations = textTransformations
        }

        public func validate(name: String) throws {
            try self.fieldToMatch.validate(name: "\(name).fieldToMatch")
            try self.textTransformations.forEach {
                try $0.validate(name: "\(name).textTransformations[]")
            }
            try self.validate(self.textTransformations, name: "textTransformations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case fieldToMatch = "FieldToMatch"
            case positionalConstraint = "PositionalConstraint"
            case searchString = "SearchString"
            case textTransformations = "TextTransformations"
        }
    }

    public struct CaptchaAction: AWSEncodableShape & AWSDecodableShape {
        /// Defines custom handling for the web request, used when the CAPTCHA inspection determines that the request's token is valid and unexpired. For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the  WAF Developer Guide.
        public let customRequestHandling: CustomRequestHandling?

        public init(customRequestHandling: CustomRequestHandling? = nil) {
            self.customRequestHandling = customRequestHandling
        }

        public func validate(name: String) throws {
            try self.customRequestHandling?.validate(name: "\(name).customRequestHandling")
        }

        private enum CodingKeys: String, CodingKey {
            case customRequestHandling = "CustomRequestHandling"
        }
    }

    public struct CaptchaConfig: AWSEncodableShape & AWSDecodableShape {
        /// Determines how long a CAPTCHA timestamp in the token remains valid after the client successfully solves a CAPTCHA puzzle.
        public let immunityTimeProperty: ImmunityTimeProperty?

        public init(immunityTimeProperty: ImmunityTimeProperty? = nil) {
            self.immunityTimeProperty = immunityTimeProperty
        }

        public func validate(name: String) throws {
            try self.immunityTimeProperty?.validate(name: "\(name).immunityTimeProperty")
        }

        private enum CodingKeys: String, CodingKey {
            case immunityTimeProperty = "ImmunityTimeProperty"
        }
    }

    public struct CaptchaResponse: AWSDecodableShape {
        /// The reason for failure, populated when the evaluation of the token fails.
        public let failureReason: FailureReason?
        /// The HTTP response code indicating the status of the CAPTCHA token in the web request. If the token is missing, invalid, or expired, this code is 405 Method Not Allowed.
        public let responseCode: Int?
        /// The time that the CAPTCHA was last solved for the supplied token.
        public let solveTimestamp: Int64?

        public init(failureReason: FailureReason? = nil, responseCode: Int? = nil, solveTimestamp: Int64? = nil) {
            self.failureReason = failureReason
            self.responseCode = responseCode
            self.solveTimestamp = solveTimestamp
        }

        private enum CodingKeys: String, CodingKey {
            case failureReason = "FailureReason"
            case responseCode = "ResponseCode"
            case solveTimestamp = "SolveTimestamp"
        }
    }

    public struct ChallengeAction: AWSEncodableShape & AWSDecodableShape {
        /// Defines custom handling for the web request, used when the challenge inspection determines that the request's token is valid and unexpired. For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the  WAF Developer Guide.
        public let customRequestHandling: CustomRequestHandling?

        public init(customRequestHandling: CustomRequestHandling? = nil) {
            self.customRequestHandling = customRequestHandling
        }

        public func validate(name: String) throws {
            try self.customRequestHandling?.validate(name: "\(name).customRequestHandling")
        }

        private enum CodingKeys: String, CodingKey {
            case customRequestHandling = "CustomRequestHandling"
        }
    }

    public struct ChallengeConfig: AWSEncodableShape & AWSDecodableShape {
        /// Determines how long a challenge timestamp in the token remains valid after the client successfully responds to a challenge.
        public let immunityTimeProperty: ImmunityTimeProperty?

        public init(immunityTimeProperty: ImmunityTimeProperty? = nil) {
            self.immunityTimeProperty = immunityTimeProperty
        }

        public func validate(name: String) throws {
            try self.immunityTimeProperty?.validate(name: "\(name).immunityTimeProperty")
        }

        private enum CodingKeys: String, CodingKey {
            case immunityTimeProperty = "ImmunityTimeProperty"
        }
    }

    public struct ChallengeResponse: AWSDecodableShape {
        /// The reason for failure, populated when the evaluation of the token fails.
        public let failureReason: FailureReason?
        /// The HTTP response code indicating the status of the challenge token in the web request. If the token is missing, invalid, or expired, this code is 202 Request Accepted.
        public let responseCode: Int?
        /// The time that the challenge was last solved for the supplied token.
        public let solveTimestamp: Int64?

        public init(failureReason: FailureReason? = nil, responseCode: Int? = nil, solveTimestamp: Int64? = nil) {
            self.failureReason = failureReason
            self.responseCode = responseCode
            self.solveTimestamp = solveTimestamp
        }

        private enum CodingKeys: String, CodingKey {
            case failureReason = "FailureReason"
            case responseCode = "ResponseCode"
            case solveTimestamp = "SolveTimestamp"
        }
    }

    public struct CheckCapacityRequest: AWSEncodableShape {
        /// An array of Rule that you're configuring to use in a rule group or web ACL.
        public let rules: [Rule]
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(rules: [Rule], scope: Scope) {
            self.rules = rules
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.rules.forEach {
                try $0.validate(name: "\(name).rules[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case rules = "Rules"
            case scope = "Scope"
        }
    }

    public struct CheckCapacityResponse: AWSDecodableShape {
        /// The capacity required by the rules and scope.
        public let capacity: Int64?

        public init(capacity: Int64? = nil) {
            self.capacity = capacity
        }

        private enum CodingKeys: String, CodingKey {
            case capacity = "Capacity"
        }
    }

    public struct Condition: AWSEncodableShape & AWSDecodableShape {
        /// A single action condition. This is the action setting that a log record must contain in order to meet the condition.
        public let actionCondition: ActionCondition?
        /// A single label name condition. This is the fully qualified label name that a log record must contain in order to meet the condition.  Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label.
        public let labelNameCondition: LabelNameCondition?

        public init(actionCondition: ActionCondition? = nil, labelNameCondition: LabelNameCondition? = nil) {
            self.actionCondition = actionCondition
            self.labelNameCondition = labelNameCondition
        }

        public func validate(name: String) throws {
            try self.labelNameCondition?.validate(name: "\(name).labelNameCondition")
        }

        private enum CodingKeys: String, CodingKey {
            case actionCondition = "ActionCondition"
            case labelNameCondition = "LabelNameCondition"
        }
    }

    public struct CookieMatchPattern: AWSEncodableShape & AWSDecodableShape {
        /// Inspect all cookies.
        public let all: All?
        /// Inspect only the cookies whose keys don't match any of the strings specified here.
        public let excludedCookies: [String]?
        /// Inspect only the cookies that have a key that matches one of the strings specified here.
        public let includedCookies: [String]?

        public init(all: All? = nil, excludedCookies: [String]? = nil, includedCookies: [String]? = nil) {
            self.all = all
            self.excludedCookies = excludedCookies
            self.includedCookies = includedCookies
        }

        public func validate(name: String) throws {
            try self.excludedCookies?.forEach {
                try validate($0, name: "excludedCookies[]", parent: name, max: 60)
                try validate($0, name: "excludedCookies[]", parent: name, min: 1)
                try validate($0, name: "excludedCookies[]", parent: name, pattern: "\\S")
            }
            try self.validate(self.excludedCookies, name: "excludedCookies", parent: name, max: 199)
            try self.validate(self.excludedCookies, name: "excludedCookies", parent: name, min: 1)
            try self.includedCookies?.forEach {
                try validate($0, name: "includedCookies[]", parent: name, max: 60)
                try validate($0, name: "includedCookies[]", parent: name, min: 1)
                try validate($0, name: "includedCookies[]", parent: name, pattern: "\\S")
            }
            try self.validate(self.includedCookies, name: "includedCookies", parent: name, max: 199)
            try self.validate(self.includedCookies, name: "includedCookies", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case all = "All"
            case excludedCookies = "ExcludedCookies"
            case includedCookies = "IncludedCookies"
        }
    }

    public struct Cookies: AWSEncodableShape & AWSDecodableShape {
        /// The filter to use to identify the subset of cookies to inspect in a web request.  You must specify exactly one setting: either All, IncludedCookies, or ExcludedCookies. Example JSON: "MatchPattern": { "IncludedCookies": {"KeyToInclude1", "KeyToInclude2", "KeyToInclude3"} }
        public let matchPattern: CookieMatchPattern
        /// The parts of the cookies to inspect with the rule inspection criteria. If you specify All, WAF inspects both keys and values.
        public let matchScope: MapMatchScope
        /// What WAF should do if the cookies of the request are larger than WAF can inspect.  WAF does not support inspecting the entire contents of request cookies  when they exceed 8 KB (8192 bytes) or 200 total cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of cookie contents to WAF.  The options for oversize handling are the following:    CONTINUE - Inspect the cookies normally, according to the rule inspection criteria.     MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the request.    NO_MATCH - Treat the web request as not matching the rule statement.
        public let oversizeHandling: OversizeHandling

        public init(matchPattern: CookieMatchPattern, matchScope: MapMatchScope, oversizeHandling: OversizeHandling) {
            self.matchPattern = matchPattern
            self.matchScope = matchScope
            self.oversizeHandling = oversizeHandling
        }

        public func validate(name: String) throws {
            try self.matchPattern.validate(name: "\(name).matchPattern")
        }

        private enum CodingKeys: String, CodingKey {
            case matchPattern = "MatchPattern"
            case matchScope = "MatchScope"
            case oversizeHandling = "OversizeHandling"
        }
    }

    public struct CountAction: AWSEncodableShape & AWSDecodableShape {
        /// Defines custom handling for the web request. For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the  WAF Developer Guide.
        public let customRequestHandling: CustomRequestHandling?

        public init(customRequestHandling: CustomRequestHandling? = nil) {
            self.customRequestHandling = customRequestHandling
        }

        public func validate(name: String) throws {
            try self.customRequestHandling?.validate(name: "\(name).customRequestHandling")
        }

        private enum CodingKeys: String, CodingKey {
            case customRequestHandling = "CustomRequestHandling"
        }
    }

    public struct CreateIPSetRequest: AWSEncodableShape {
        /// Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses. All addresses must be specified using Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for /0.  Example address strings:    To configure WAF to allow, block, or count requests that originated from the IP address 192.0.2.44, specify 192.0.2.44/32.   To configure WAF to allow, block, or count requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify  192.0.2.0/24.   To configure WAF to allow, block, or count requests that originated from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128.   To configure WAF to allow, block, or count requests that originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify 1111:0000:0000:0000:0000:0000:0000:0000/64.   For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing. Example JSON Addresses specifications:    Empty array: "Addresses": []    Array with one address: "Addresses": ["192.0.2.44/32"]    Array with three addresses: "Addresses": ["192.0.2.44/32", "192.0.2.0/24", "192.0.0.0/16"]    INVALID specification: "Addresses": [""] INVALID
        public let addresses: [String]
        /// A description of the IP set that helps with identification.
        public let description: String?
        /// The version of the IP addresses, either IPV4 or IPV6.
        public let ipAddressVersion: IPAddressVersion
        /// The name of the IP set. You cannot change the name of an IPSet after you create it.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// An array of key:value pairs to associate with the resource.
        public let tags: [Tag]?

        public init(addresses: [String], description: String? = nil, ipAddressVersion: IPAddressVersion, name: String, scope: Scope, tags: [Tag]? = nil) {
            self.addresses = addresses
            self.description = description
            self.ipAddressVersion = ipAddressVersion
            self.name = name
            self.scope = scope
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.addresses.forEach {
                try validate($0, name: "addresses[]", parent: name, max: 50)
                try validate($0, name: "addresses[]", parent: name, min: 1)
                try validate($0, name: "addresses[]", parent: name, pattern: "\\S")
            }
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\w+=:#@/\\-,\\.][\\w+=:#@/\\-,\\.\\s]+[\\w+=:#@/\\-,\\.]$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case addresses = "Addresses"
            case description = "Description"
            case ipAddressVersion = "IPAddressVersion"
            case name = "Name"
            case scope = "Scope"
            case tags = "Tags"
        }
    }

    public struct CreateIPSetResponse: AWSDecodableShape {
        /// High-level information about an IPSet, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage an IPSet, and the ARN, that you provide to the IPSetReferenceStatement to use the address set in a Rule.
        public let summary: IPSetSummary?

        public init(summary: IPSetSummary? = nil) {
            self.summary = summary
        }

        private enum CodingKeys: String, CodingKey {
            case summary = "Summary"
        }
    }

    public struct CreateRegexPatternSetRequest: AWSEncodableShape {
        /// A description of the set that helps with identification.
        public let description: String?
        /// The name of the set. You cannot change the name after you create the set.
        public let name: String
        /// Array of regular expression strings.
        public let regularExpressionList: [Regex]
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// An array of key:value pairs to associate with the resource.
        public let tags: [Tag]?

        public init(description: String? = nil, name: String, regularExpressionList: [Regex], scope: Scope, tags: [Tag]? = nil) {
            self.description = description
            self.name = name
            self.regularExpressionList = regularExpressionList
            self.scope = scope
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\w+=:#@/\\-,\\.][\\w+=:#@/\\-,\\.\\s]+[\\w+=:#@/\\-,\\.]$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.regularExpressionList.forEach {
                try $0.validate(name: "\(name).regularExpressionList[]")
            }
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
            case regularExpressionList = "RegularExpressionList"
            case scope = "Scope"
            case tags = "Tags"
        }
    }

    public struct CreateRegexPatternSetResponse: AWSDecodableShape {
        /// High-level information about a RegexPatternSet, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a RegexPatternSet, and the ARN, that you provide to the RegexPatternSetReferenceStatement to use the pattern set in a Rule.
        public let summary: RegexPatternSetSummary?

        public init(summary: RegexPatternSetSummary? = nil) {
            self.summary = summary
        }

        private enum CodingKeys: String, CodingKey {
            case summary = "Summary"
        }
    }

    public struct CreateRuleGroupRequest: AWSEncodableShape {
        /// The web ACL capacity units (WCUs) required for this rule group. When you create your own rule group, you define this, and you cannot change it after creation.  When you add or modify the rules in a rule group, WAF enforces this limit. You can check the capacity  for a set of rules using CheckCapacity. WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule.  Simple rules that cost little to run use fewer WCUs than more complex rules
        /// 				that use more processing power.
        /// 				Rule group capacity is fixed at creation, which helps users plan their   web ACL WCU usage when they use a rule group.  The WCU limit for web ACLs is 1,500.
        public let capacity: Int64
        /// A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.  For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the  WAF Developer Guide.  For information about the limits on count and size for custom request and response settings, see WAF quotas in the  WAF Developer Guide.
        public let customResponseBodies: [String: CustomResponseBody]?
        /// A description of the rule group that helps with identification.
        public let description: String?
        /// The name of the rule group. You cannot change the name of a rule group after you create it.
        public let name: String
        /// The Rule statements used to identify the web requests that you  want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching   web requests, and parameters that govern how WAF handles them.
        public let rules: [Rule]?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// An array of key:value pairs to associate with the resource.
        public let tags: [Tag]?
        /// Defines and enables Amazon CloudWatch metrics and web request sample collection.
        public let visibilityConfig: VisibilityConfig

        public init(capacity: Int64 = 0, customResponseBodies: [String: CustomResponseBody]? = nil, description: String? = nil, name: String, rules: [Rule]? = nil, scope: Scope, tags: [Tag]? = nil, visibilityConfig: VisibilityConfig) {
            self.capacity = capacity
            self.customResponseBodies = customResponseBodies
            self.description = description
            self.name = name
            self.rules = rules
            self.scope = scope
            self.tags = tags
            self.visibilityConfig = visibilityConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.capacity, name: "capacity", parent: name, min: 1)
            try self.customResponseBodies?.forEach {
                try validate($0.key, name: "customResponseBodies.key", parent: name, max: 128)
                try validate($0.key, name: "customResponseBodies.key", parent: name, min: 1)
                try validate($0.key, name: "customResponseBodies.key", parent: name, pattern: "^[\\w\\-]+$")
                try $0.value.validate(name: "\(name).customResponseBodies[\"\($0.key)\"]")
            }
            try self.validate(self.customResponseBodies, name: "customResponseBodies", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\w+=:#@/\\-,\\.][\\w+=:#@/\\-,\\.\\s]+[\\w+=:#@/\\-,\\.]$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.rules?.forEach {
                try $0.validate(name: "\(name).rules[]")
            }
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
            try self.visibilityConfig.validate(name: "\(name).visibilityConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case capacity = "Capacity"
            case customResponseBodies = "CustomResponseBodies"
            case description = "Description"
            case name = "Name"
            case rules = "Rules"
            case scope = "Scope"
            case tags = "Tags"
            case visibilityConfig = "VisibilityConfig"
        }
    }

    public struct CreateRuleGroupResponse: AWSDecodableShape {
        /// High-level information about a RuleGroup, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a RuleGroup, and the ARN, that you provide to the RuleGroupReferenceStatement to use the rule group in a Rule.
        public let summary: RuleGroupSummary?

        public init(summary: RuleGroupSummary? = nil) {
            self.summary = summary
        }

        private enum CodingKeys: String, CodingKey {
            case summary = "Summary"
        }
    }

    public struct CreateWebACLRequest: AWSEncodableShape {
        /// Specifies how WAF should handle CAPTCHA evaluations for rules that don't have their own CaptchaConfig settings. If you don't specify this, WAF uses its default settings for CaptchaConfig.
        public let captchaConfig: CaptchaConfig?
        /// Specifies how WAF should handle challenge evaluations for rules that don't have
        /// their own ChallengeConfig settings. If you don't specify this, WAF uses its default settings for ChallengeConfig.
        public let challengeConfig: ChallengeConfig?
        /// A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.  For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the  WAF Developer Guide.  For information about the limits on count and size for custom request and response settings, see WAF quotas in the  WAF Developer Guide.
        public let customResponseBodies: [String: CustomResponseBody]?
        /// The action to perform if none of the Rules contained in the WebACL match.
        public let defaultAction: DefaultAction
        /// A description of the web ACL that helps with identification.
        public let description: String?
        /// The name of the web ACL. You cannot change the name of a web ACL after you create it.
        public let name: String
        /// The Rule statements used to identify the web requests that you  want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching   web requests, and parameters that govern how WAF handles them.
        public let rules: [Rule]?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// An array of key:value pairs to associate with the resource.
        public let tags: [Tag]?
        /// Specifies the domains that WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When WAF provides a token, it uses the domain of the Amazon Web Services resource that the web ACL is protecting. If you don't specify a list of token domains, WAF accepts tokens only for the domain of the protected resource. With a token domain list, WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains. Example JSON: "TokenDomains": { "mywebsite.com", "myotherwebsite.com" }  Public suffixes aren't allowed. For example, you can't use usa.gov or co.uk as token domains.
        public let tokenDomains: [String]?
        /// Defines and enables Amazon CloudWatch metrics and web request sample collection.
        public let visibilityConfig: VisibilityConfig

        public init(captchaConfig: CaptchaConfig? = nil, challengeConfig: ChallengeConfig? = nil, customResponseBodies: [String: CustomResponseBody]? = nil, defaultAction: DefaultAction, description: String? = nil, name: String, rules: [Rule]? = nil, scope: Scope, tags: [Tag]? = nil, tokenDomains: [String]? = nil, visibilityConfig: VisibilityConfig) {
            self.captchaConfig = captchaConfig
            self.challengeConfig = challengeConfig
            self.customResponseBodies = customResponseBodies
            self.defaultAction = defaultAction
            self.description = description
            self.name = name
            self.rules = rules
            self.scope = scope
            self.tags = tags
            self.tokenDomains = tokenDomains
            self.visibilityConfig = visibilityConfig
        }

        public func validate(name: String) throws {
            try self.captchaConfig?.validate(name: "\(name).captchaConfig")
            try self.challengeConfig?.validate(name: "\(name).challengeConfig")
            try self.customResponseBodies?.forEach {
                try validate($0.key, name: "customResponseBodies.key", parent: name, max: 128)
                try validate($0.key, name: "customResponseBodies.key", parent: name, min: 1)
                try validate($0.key, name: "customResponseBodies.key", parent: name, pattern: "^[\\w\\-]+$")
                try $0.value.validate(name: "\(name).customResponseBodies[\"\($0.key)\"]")
            }
            try self.validate(self.customResponseBodies, name: "customResponseBodies", parent: name, min: 1)
            try self.defaultAction.validate(name: "\(name).defaultAction")
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\w+=:#@/\\-,\\.][\\w+=:#@/\\-,\\.\\s]+[\\w+=:#@/\\-,\\.]$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.rules?.forEach {
                try $0.validate(name: "\(name).rules[]")
            }
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
            try self.tokenDomains?.forEach {
                try validate($0, name: "tokenDomains[]", parent: name, max: 253)
                try validate($0, name: "tokenDomains[]", parent: name, min: 1)
                try validate($0, name: "tokenDomains[]", parent: name, pattern: "^[\\w\\.\\-/]+$")
            }
            try self.validate(self.tokenDomains, name: "tokenDomains", parent: name, min: 1)
            try self.visibilityConfig.validate(name: "\(name).visibilityConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case captchaConfig = "CaptchaConfig"
            case challengeConfig = "ChallengeConfig"
            case customResponseBodies = "CustomResponseBodies"
            case defaultAction = "DefaultAction"
            case description = "Description"
            case name = "Name"
            case rules = "Rules"
            case scope = "Scope"
            case tags = "Tags"
            case tokenDomains = "TokenDomains"
            case visibilityConfig = "VisibilityConfig"
        }
    }

    public struct CreateWebACLResponse: AWSDecodableShape {
        /// High-level information about a WebACL, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a WebACL, and the ARN, that you provide to operations like AssociateWebACL.
        public let summary: WebACLSummary?

        public init(summary: WebACLSummary? = nil) {
            self.summary = summary
        }

        private enum CodingKeys: String, CodingKey {
            case summary = "Summary"
        }
    }

    public struct CustomHTTPHeader: AWSEncodableShape & AWSDecodableShape {
        /// The name of the custom header.  For custom request header insertion, when WAF inserts the header into the request, it prefixes this name x-amzn-waf-, to avoid confusion with the headers that are already in the request. For example, for the header name sample, WAF inserts the header x-amzn-waf-sample.
        public let name: String
        /// The value of the custom header.
        public let value: String

        public init(name: String, value: String) {
            self.name = name
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._$-]+$")
            try self.validate(self.value, name: "value", parent: name, max: 255)
            try self.validate(self.value, name: "value", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case value = "Value"
        }
    }

    public struct CustomRequestHandling: AWSEncodableShape & AWSDecodableShape {
        /// The HTTP headers to insert into the request. Duplicate header names are not allowed.  For information about the limits on count and size for custom request and response settings, see WAF quotas in the  WAF Developer Guide.
        public let insertHeaders: [CustomHTTPHeader]

        public init(insertHeaders: [CustomHTTPHeader]) {
            self.insertHeaders = insertHeaders
        }

        public func validate(name: String) throws {
            try self.insertHeaders.forEach {
                try $0.validate(name: "\(name).insertHeaders[]")
            }
            try self.validate(self.insertHeaders, name: "insertHeaders", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case insertHeaders = "InsertHeaders"
        }
    }

    public struct CustomResponse: AWSEncodableShape & AWSDecodableShape {
        /// References the response body that you want WAF to return to the web request client. You can define a custom response for a rule action or a default web ACL action that is set to block. To do this, you first define the response body key and value in the CustomResponseBodies setting for the WebACL or RuleGroup where you want to use it. Then, in the rule action or web ACL default action BlockAction setting, you reference the response body using this key.
        public let customResponseBodyKey: String?
        /// The HTTP status code to return to the client.  For a list of status codes that you can use in your custom responses, see Supported status codes for custom response in the  WAF Developer Guide.
        public let responseCode: Int
        /// The HTTP headers to use in the response. Duplicate header names are not allowed.  For information about the limits on count and size for custom request and response settings, see WAF quotas in the  WAF Developer Guide.
        public let responseHeaders: [CustomHTTPHeader]?

        public init(customResponseBodyKey: String? = nil, responseCode: Int, responseHeaders: [CustomHTTPHeader]? = nil) {
            self.customResponseBodyKey = customResponseBodyKey
            self.responseCode = responseCode
            self.responseHeaders = responseHeaders
        }

        public func validate(name: String) throws {
            try self.validate(self.customResponseBodyKey, name: "customResponseBodyKey", parent: name, max: 128)
            try self.validate(self.customResponseBodyKey, name: "customResponseBodyKey", parent: name, min: 1)
            try self.validate(self.customResponseBodyKey, name: "customResponseBodyKey", parent: name, pattern: "^[\\w\\-]+$")
            try self.validate(self.responseCode, name: "responseCode", parent: name, max: 599)
            try self.validate(self.responseCode, name: "responseCode", parent: name, min: 200)
            try self.responseHeaders?.forEach {
                try $0.validate(name: "\(name).responseHeaders[]")
            }
            try self.validate(self.responseHeaders, name: "responseHeaders", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case customResponseBodyKey = "CustomResponseBodyKey"
            case responseCode = "ResponseCode"
            case responseHeaders = "ResponseHeaders"
        }
    }

    public struct CustomResponseBody: AWSEncodableShape & AWSDecodableShape {
        /// The payload of the custom response.  You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the ContentType setting.  For information about the limits on count and size for custom request and response settings, see WAF quotas in the  WAF Developer Guide.
        public let content: String
        /// The type of content in the payload that you are defining in the Content string.
        public let contentType: ResponseContentType

        public init(content: String, contentType: ResponseContentType) {
            self.content = content
            self.contentType = contentType
        }

        public func validate(name: String) throws {
            try self.validate(self.content, name: "content", parent: name, max: 10240)
            try self.validate(self.content, name: "content", parent: name, min: 1)
            try self.validate(self.content, name: "content", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case content = "Content"
            case contentType = "ContentType"
        }
    }

    public struct DefaultAction: AWSEncodableShape & AWSDecodableShape {
        /// Specifies that WAF should allow requests by default.
        public let allow: AllowAction?
        /// Specifies that WAF should block requests by default.
        public let block: BlockAction?

        public init(allow: AllowAction? = nil, block: BlockAction? = nil) {
            self.allow = allow
            self.block = block
        }

        public func validate(name: String) throws {
            try self.allow?.validate(name: "\(name).allow")
            try self.block?.validate(name: "\(name).block")
        }

        private enum CodingKeys: String, CodingKey {
            case allow = "Allow"
            case block = "Block"
        }
    }

    public struct DeleteFirewallManagerRuleGroupsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the web ACL.
        public let webACLArn: String
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let webACLLockToken: String

        public init(webACLArn: String, webACLLockToken: String) {
            self.webACLArn = webACLArn
            self.webACLLockToken = webACLLockToken
        }

        public func validate(name: String) throws {
            try self.validate(self.webACLArn, name: "webACLArn", parent: name, max: 2048)
            try self.validate(self.webACLArn, name: "webACLArn", parent: name, min: 20)
            try self.validate(self.webACLArn, name: "webACLArn", parent: name, pattern: "\\S")
            try self.validate(self.webACLLockToken, name: "webACLLockToken", parent: name, max: 36)
            try self.validate(self.webACLLockToken, name: "webACLLockToken", parent: name, min: 1)
            try self.validate(self.webACLLockToken, name: "webACLLockToken", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case webACLArn = "WebACLArn"
            case webACLLockToken = "WebACLLockToken"
        }
    }

    public struct DeleteFirewallManagerRuleGroupsResponse: AWSDecodableShape {
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let nextWebACLLockToken: String?

        public init(nextWebACLLockToken: String? = nil) {
            self.nextWebACLLockToken = nextWebACLLockToken
        }

        private enum CodingKeys: String, CodingKey {
            case nextWebACLLockToken = "NextWebACLLockToken"
        }
    }

    public struct DeleteIPSetRequest: AWSEncodableShape {
        /// A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String
        /// The name of the IP set. You cannot change the name of an IPSet after you create it.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(id: String, lockToken: String, name: String, scope: Scope) {
            self.id = id
            self.lockToken = lockToken
            self.name = name
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.lockToken, name: "lockToken", parent: name, max: 36)
            try self.validate(self.lockToken, name: "lockToken", parent: name, min: 1)
            try self.validate(self.lockToken, name: "lockToken", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
            case scope = "Scope"
        }
    }

    public struct DeleteIPSetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteLoggingConfigurationRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the web ACL from which you want to delete the LoggingConfiguration.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct DeleteLoggingConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeletePermissionPolicyRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the rule group from which you want to delete the policy. You must be the owner of the rule group to perform this operation.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct DeletePermissionPolicyResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteRegexPatternSetRequest: AWSEncodableShape {
        /// A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String
        /// The name of the set. You cannot change the name after you create the set.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(id: String, lockToken: String, name: String, scope: Scope) {
            self.id = id
            self.lockToken = lockToken
            self.name = name
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.lockToken, name: "lockToken", parent: name, max: 36)
            try self.validate(self.lockToken, name: "lockToken", parent: name, min: 1)
            try self.validate(self.lockToken, name: "lockToken", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
            case scope = "Scope"
        }
    }

    public struct DeleteRegexPatternSetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteRuleGroupRequest: AWSEncodableShape {
        /// A unique identifier for the rule group. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String
        /// The name of the rule group. You cannot change the name of a rule group after you create it.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(id: String, lockToken: String, name: String, scope: Scope) {
            self.id = id
            self.lockToken = lockToken
            self.name = name
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.lockToken, name: "lockToken", parent: name, max: 36)
            try self.validate(self.lockToken, name: "lockToken", parent: name, min: 1)
            try self.validate(self.lockToken, name: "lockToken", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
            case scope = "Scope"
        }
    }

    public struct DeleteRuleGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteWebACLRequest: AWSEncodableShape {
        /// The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String
        /// The name of the web ACL. You cannot change the name of a web ACL after you create it.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(id: String, lockToken: String, name: String, scope: Scope) {
            self.id = id
            self.lockToken = lockToken
            self.name = name
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.lockToken, name: "lockToken", parent: name, max: 36)
            try self.validate(self.lockToken, name: "lockToken", parent: name, min: 1)
            try self.validate(self.lockToken, name: "lockToken", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
            case scope = "Scope"
        }
    }

    public struct DeleteWebACLResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeManagedRuleGroupRequest: AWSEncodableShape {
        /// The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// The name of the managed rule group vendor. You use this, along with the rule group name, to identify the rule group.
        public let vendorName: String
        /// The version of the rule group. You can only use a version that is not scheduled for expiration. If you don't provide this, WAF uses the vendor's default version.
        public let versionName: String?

        public init(name: String, scope: Scope, vendorName: String, versionName: String? = nil) {
            self.name = name
            self.scope = scope
            self.vendorName = vendorName
            self.versionName = versionName
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.validate(self.vendorName, name: "vendorName", parent: name, max: 128)
            try self.validate(self.vendorName, name: "vendorName", parent: name, min: 1)
            try self.validate(self.vendorName, name: "vendorName", parent: name, pattern: "\\S")
            try self.validate(self.versionName, name: "versionName", parent: name, max: 64)
            try self.validate(self.versionName, name: "versionName", parent: name, min: 1)
            try self.validate(self.versionName, name: "versionName", parent: name, pattern: "^[\\w#:\\.\\-/]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case scope = "Scope"
            case vendorName = "VendorName"
            case versionName = "VersionName"
        }
    }

    public struct DescribeManagedRuleGroupResponse: AWSDecodableShape {
        /// The labels that one or more rules in this rule group add to matching web requests. These labels are defined in the RuleLabels for a Rule.
        public let availableLabels: [LabelSummary]?
        /// The web ACL capacity units (WCUs) required for this rule group. WAF uses web ACL capacity units (WCU) to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect each rule's relative cost. Rule group capacity is fixed at creation, so users can plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.
        public let capacity: Int64?
        /// The labels that one or more rules in this rule group match against in label match statements. These labels are defined in a LabelMatchStatement specification, in the Statement definition of a rule.
        public let consumedLabels: [LabelSummary]?
        /// The label namespace prefix for this rule group. All labels added by rules in this rule group have this prefix.    The syntax for the label namespace prefix for a managed rule group is the following:   awswaf:managed:::   When a rule with a label matches a web request, WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon:   :
        public let labelNamespace: String?
        public let rules: [RuleSummary]?
        /// The Amazon resource name (ARN) of the Amazon Simple Notification Service SNS topic that's used to record changes to the managed rule group. You can subscribe to the SNS topic to receive notifications when the managed rule group is modified, such as for new versions and for version expiration. For more information, see the Amazon Simple Notification Service Developer Guide.
        public let snsTopicArn: String?
        /// The managed rule group's version.
        public let versionName: String?

        public init(availableLabels: [LabelSummary]? = nil, capacity: Int64? = nil, consumedLabels: [LabelSummary]? = nil, labelNamespace: String? = nil, rules: [RuleSummary]? = nil, snsTopicArn: String? = nil, versionName: String? = nil) {
            self.availableLabels = availableLabels
            self.capacity = capacity
            self.consumedLabels = consumedLabels
            self.labelNamespace = labelNamespace
            self.rules = rules
            self.snsTopicArn = snsTopicArn
            self.versionName = versionName
        }

        private enum CodingKeys: String, CodingKey {
            case availableLabels = "AvailableLabels"
            case capacity = "Capacity"
            case consumedLabels = "ConsumedLabels"
            case labelNamespace = "LabelNamespace"
            case rules = "Rules"
            case snsTopicArn = "SnsTopicArn"
            case versionName = "VersionName"
        }
    }

    public struct DisassociateWebACLRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource to disassociate from the web ACL.  The ARN must be in one of the following formats:   For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id     For an Amazon API Gateway REST API: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name     For an AppSync GraphQL API: arn:aws:appsync:region:account-id:apis/GraphQLApiId     For an Amazon Cognito user pool: arn:aws:cognito-idp:region:account-id:userpool/user-pool-id
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct DisassociateWebACLResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ExcludedRule: AWSEncodableShape & AWSDecodableShape {
        /// The name of the rule whose action you want to override to Count.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct FieldToMatch: AWSEncodableShape & AWSDecodableShape {
        /// Inspect all query arguments.
        public let allQueryArguments: AllQueryArguments?
        /// Inspect the request body as plain text. The request body immediately follows the request headers. This is the part of a request that contains any additional data that you want to send to your web server as the HTTP request body, such as data from a form.  Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the Body object configuration.
        public let body: Body?
        /// Inspect the request cookies. You must configure scope and pattern matching filters in the Cookies object, to define the set of cookies and the parts of the cookies that WAF inspects.  Only the first 8 KB (8192 bytes) of a request's cookies and only the first 200 cookies are forwarded to WAF for inspection by the underlying host service. You must configure how to handle any oversize cookie content in the Cookies object. WAF applies the pattern matching filters to the cookies that it receives from the underlying host service.
        public let cookies: Cookies?
        /// Inspect the request headers. You must configure scope and pattern matching filters in the Headers object, to define the set of headers to and the parts of the headers that WAF inspects.  Only the first 8 KB (8192 bytes) of a request's headers and only the first 200 headers are forwarded to WAF for inspection by the underlying host service. You must configure how to handle any oversize header content in the Headers object. WAF applies the pattern matching filters to the headers that it receives from the underlying host service.
        public let headers: Headers?
        /// Inspect the request body as JSON. The request body immediately follows the request headers. This is the part of a request that contains any additional data that you want to send to your web server as the HTTP request body, such as data from a form.  Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the JsonBody object configuration.
        public let jsonBody: JsonBody?
        /// Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to perform.
        public let method: Method?
        /// Inspect the query string. This is the part of a URL that appears after a ? character, if any.
        public let queryString: QueryString?
        /// Inspect a single header. Provide the name of the header to inspect, for example, User-Agent or Referer. This setting isn't case sensitive. Example JSON: "SingleHeader": { "Name": "haystack" }  Alternately, you can filter and inspect all headers with the Headers FieldToMatch setting.
        public let singleHeader: SingleHeader?
        /// Inspect a single query argument. Provide the name of the query argument to inspect, such as UserName or SalesRegion. The name can be up to 30 characters long and isn't case sensitive.  Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
        public let singleQueryArgument: SingleQueryArgument?
        /// Inspect the request URI path. This is the part of the web request that identifies a resource, for example, /images/daily-ad.jpg.
        public let uriPath: UriPath?

        public init(allQueryArguments: AllQueryArguments? = nil, body: Body? = nil, cookies: Cookies? = nil, headers: Headers? = nil, jsonBody: JsonBody? = nil, method: Method? = nil, queryString: QueryString? = nil, singleHeader: SingleHeader? = nil, singleQueryArgument: SingleQueryArgument? = nil, uriPath: UriPath? = nil) {
            self.allQueryArguments = allQueryArguments
            self.body = body
            self.cookies = cookies
            self.headers = headers
            self.jsonBody = jsonBody
            self.method = method
            self.queryString = queryString
            self.singleHeader = singleHeader
            self.singleQueryArgument = singleQueryArgument
            self.uriPath = uriPath
        }

        public func validate(name: String) throws {
            try self.cookies?.validate(name: "\(name).cookies")
            try self.headers?.validate(name: "\(name).headers")
            try self.jsonBody?.validate(name: "\(name).jsonBody")
            try self.singleHeader?.validate(name: "\(name).singleHeader")
            try self.singleQueryArgument?.validate(name: "\(name).singleQueryArgument")
        }

        private enum CodingKeys: String, CodingKey {
            case allQueryArguments = "AllQueryArguments"
            case body = "Body"
            case cookies = "Cookies"
            case headers = "Headers"
            case jsonBody = "JsonBody"
            case method = "Method"
            case queryString = "QueryString"
            case singleHeader = "SingleHeader"
            case singleQueryArgument = "SingleQueryArgument"
            case uriPath = "UriPath"
        }
    }

    public struct Filter: AWSEncodableShape & AWSDecodableShape {
        /// How to handle logs that satisfy the filter's conditions and requirement.
        public let behavior: FilterBehavior
        /// Match conditions for the filter.
        public let conditions: [Condition]
        /// Logic to apply to the filtering conditions. You can specify that, in order to satisfy the filter, a log must match all conditions or must match at least one condition.
        public let requirement: FilterRequirement

        public init(behavior: FilterBehavior, conditions: [Condition], requirement: FilterRequirement) {
            self.behavior = behavior
            self.conditions = conditions
            self.requirement = requirement
        }

        public func validate(name: String) throws {
            try self.conditions.forEach {
                try $0.validate(name: "\(name).conditions[]")
            }
            try self.validate(self.conditions, name: "conditions", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case behavior = "Behavior"
            case conditions = "Conditions"
            case requirement = "Requirement"
        }
    }

    public struct FirewallManagerRuleGroup: AWSDecodableShape {
        /// The processing guidance for an Firewall Manager rule. This is like a regular rule Statement, but it can only contain a rule group reference.
        public let firewallManagerStatement: FirewallManagerStatement
        /// The name of the rule group. You cannot change the name of a rule group after you create it.
        public let name: String
        /// The action to use in the place of the action that results from the rule group evaluation. Set the override action to none to leave the result of the rule group alone. Set it to count to override the result to count only.  You can only use this for rule statements that reference a rule group, like RuleGroupReferenceStatement and ManagedRuleGroupStatement.   This option is usually set to none. It does not affect how the rules in the rule group are evaluated. If you want the rules in the rule group to only count   matches, do not use this and instead use the rule action override option, with Count action, in your rule group reference statement settings.
        public let overrideAction: OverrideAction
        /// If you define more than one rule group in the first or last Firewall Manager rule groups, WAF evaluates each request against the rule groups in order, starting from the lowest priority setting. The priorities don't need to be consecutive, but they must all be different.
        public let priority: Int
        /// Defines and enables Amazon CloudWatch metrics and web request sample collection.
        public let visibilityConfig: VisibilityConfig

        public init(firewallManagerStatement: FirewallManagerStatement, name: String, overrideAction: OverrideAction, priority: Int, visibilityConfig: VisibilityConfig) {
            self.firewallManagerStatement = firewallManagerStatement
            self.name = name
            self.overrideAction = overrideAction
            self.priority = priority
            self.visibilityConfig = visibilityConfig
        }

        private enum CodingKeys: String, CodingKey {
            case firewallManagerStatement = "FirewallManagerStatement"
            case name = "Name"
            case overrideAction = "OverrideAction"
            case priority = "Priority"
            case visibilityConfig = "VisibilityConfig"
        }
    }

    public struct FirewallManagerStatement: AWSDecodableShape {
        /// A rule statement used to run the rules that are defined in a managed rule group. To use this, provide the vendor name and the name of the rule group in this statement. You can retrieve the required names by calling ListAvailableManagedRuleGroups. You cannot nest a ManagedRuleGroupStatement, for example for use inside a NotStatement or OrStatement. It can only be referenced as a top-level statement within a rule.  You are charged additional fees when you use the WAF Bot Control managed rule group AWSManagedRulesBotControlRuleSet or the WAF Fraud Control account takeover prevention (ATP) managed rule group AWSManagedRulesATPRuleSet. For more information, see WAF Pricing.
        public let managedRuleGroupStatement: ManagedRuleGroupStatement?
        /// A rule statement used to run the rules that are defined in a RuleGroup. To use this, create a rule group with your rules, then provide the ARN of the rule group in this statement. You cannot nest a RuleGroupReferenceStatement, for example for use inside a NotStatement or OrStatement. You  can only use a rule group reference statement at the top level inside a web ACL.
        public let ruleGroupReferenceStatement: RuleGroupReferenceStatement?

        public init(managedRuleGroupStatement: ManagedRuleGroupStatement? = nil, ruleGroupReferenceStatement: RuleGroupReferenceStatement? = nil) {
            self.managedRuleGroupStatement = managedRuleGroupStatement
            self.ruleGroupReferenceStatement = ruleGroupReferenceStatement
        }

        private enum CodingKeys: String, CodingKey {
            case managedRuleGroupStatement = "ManagedRuleGroupStatement"
            case ruleGroupReferenceStatement = "RuleGroupReferenceStatement"
        }
    }

    public struct ForwardedIPConfig: AWSEncodableShape & AWSDecodableShape {
        /// The match status to assign to the web request if the request doesn't have a valid IP address in the specified position.  If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.  You can specify the following fallback behaviors:    MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the request.    NO_MATCH - Treat the web request as not matching the rule statement.
        public let fallbackBehavior: FallbackBehavior
        /// The name of the HTTP header to use for the IP address. For example, to use the X-Forwarded-For (XFF) header, set this to X-Forwarded-For.  If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.
        public let headerName: String

        public init(fallbackBehavior: FallbackBehavior, headerName: String) {
            self.fallbackBehavior = fallbackBehavior
            self.headerName = headerName
        }

        public func validate(name: String) throws {
            try self.validate(self.headerName, name: "headerName", parent: name, max: 255)
            try self.validate(self.headerName, name: "headerName", parent: name, min: 1)
            try self.validate(self.headerName, name: "headerName", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case fallbackBehavior = "FallbackBehavior"
            case headerName = "HeaderName"
        }
    }

    public struct GenerateMobileSdkReleaseUrlRequest: AWSEncodableShape {
        /// The device platform.
        public let platform: Platform
        /// The release version. For the latest available version, specify LATEST.
        public let releaseVersion: String

        public init(platform: Platform, releaseVersion: String) {
            self.platform = platform
            self.releaseVersion = releaseVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.releaseVersion, name: "releaseVersion", parent: name, max: 64)
            try self.validate(self.releaseVersion, name: "releaseVersion", parent: name, min: 1)
            try self.validate(self.releaseVersion, name: "releaseVersion", parent: name, pattern: "^[\\w#:\\.\\-/]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case platform = "Platform"
            case releaseVersion = "ReleaseVersion"
        }
    }

    public struct GenerateMobileSdkReleaseUrlResponse: AWSDecodableShape {
        /// The presigned download URL for the specified SDK release.
        public let url: String?

        public init(url: String? = nil) {
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case url = "Url"
        }
    }

    public struct GeoMatchStatement: AWSEncodableShape & AWSDecodableShape {
        /// An array of two-character country codes that you want to match against, for example, [ "US", "CN" ], from the alpha-2 country ISO codes of the ISO 3166 international standard.  When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that's unlikely to be a source of traffic to your site.
        public let countryCodes: [CountryCode]?
        /// The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.   If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.
        public let forwardedIPConfig: ForwardedIPConfig?

        public init(countryCodes: [CountryCode]? = nil, forwardedIPConfig: ForwardedIPConfig? = nil) {
            self.countryCodes = countryCodes
            self.forwardedIPConfig = forwardedIPConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.countryCodes, name: "countryCodes", parent: name, min: 1)
            try self.forwardedIPConfig?.validate(name: "\(name).forwardedIPConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case countryCodes = "CountryCodes"
            case forwardedIPConfig = "ForwardedIPConfig"
        }
    }

    public struct GetIPSetRequest: AWSEncodableShape {
        /// A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// The name of the IP set. You cannot change the name of an IPSet after you create it.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(id: String, name: String, scope: Scope) {
            self.id = id
            self.name = name
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case name = "Name"
            case scope = "Scope"
        }
    }

    public struct GetIPSetResponse: AWSDecodableShape {
        public let ipSet: IPSet?
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String?

        public init(ipSet: IPSet? = nil, lockToken: String? = nil) {
            self.ipSet = ipSet
            self.lockToken = lockToken
        }

        private enum CodingKeys: String, CodingKey {
            case ipSet = "IPSet"
            case lockToken = "LockToken"
        }
    }

    public struct GetLoggingConfigurationRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the web ACL for which you want to get the LoggingConfiguration.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct GetLoggingConfigurationResponse: AWSDecodableShape {
        /// The LoggingConfiguration for the specified web ACL.
        public let loggingConfiguration: LoggingConfiguration?

        public init(loggingConfiguration: LoggingConfiguration? = nil) {
            self.loggingConfiguration = loggingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case loggingConfiguration = "LoggingConfiguration"
        }
    }

    public struct GetManagedRuleSetRequest: AWSEncodableShape {
        /// A unique identifier for the managed rule set. The ID is returned in the responses to commands like list. You provide it to operations like get and update.
        public let id: String
        /// The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set. This name is assigned to the corresponding managed rule group, which your customers can access and use.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(id: String, name: String, scope: Scope) {
            self.id = id
            self.name = name
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case name = "Name"
            case scope = "Scope"
        }
    }

    public struct GetManagedRuleSetResponse: AWSDecodableShape {
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String?
        /// The managed rule set that you requested.
        public let managedRuleSet: ManagedRuleSet?

        public init(lockToken: String? = nil, managedRuleSet: ManagedRuleSet? = nil) {
            self.lockToken = lockToken
            self.managedRuleSet = managedRuleSet
        }

        private enum CodingKeys: String, CodingKey {
            case lockToken = "LockToken"
            case managedRuleSet = "ManagedRuleSet"
        }
    }

    public struct GetMobileSdkReleaseRequest: AWSEncodableShape {
        /// The device platform.
        public let platform: Platform
        /// The release version. For the latest available version, specify LATEST.
        public let releaseVersion: String

        public init(platform: Platform, releaseVersion: String) {
            self.platform = platform
            self.releaseVersion = releaseVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.releaseVersion, name: "releaseVersion", parent: name, max: 64)
            try self.validate(self.releaseVersion, name: "releaseVersion", parent: name, min: 1)
            try self.validate(self.releaseVersion, name: "releaseVersion", parent: name, pattern: "^[\\w#:\\.\\-/]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case platform = "Platform"
            case releaseVersion = "ReleaseVersion"
        }
    }

    public struct GetMobileSdkReleaseResponse: AWSDecodableShape {
        /// Information for a specified SDK release, including release notes and tags.
        public let mobileSdkRelease: MobileSdkRelease?

        public init(mobileSdkRelease: MobileSdkRelease? = nil) {
            self.mobileSdkRelease = mobileSdkRelease
        }

        private enum CodingKeys: String, CodingKey {
            case mobileSdkRelease = "MobileSdkRelease"
        }
    }

    public struct GetPermissionPolicyRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the rule group for which you want to get the policy.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct GetPermissionPolicyResponse: AWSDecodableShape {
        /// The IAM policy that is attached to the specified rule group.
        public let policy: String?

        public init(policy: String? = nil) {
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "Policy"
        }
    }

    public struct GetRateBasedStatementManagedKeysRequest: AWSEncodableShape {
        /// The name of the rule group reference statement in your web ACL. This is required only when you have the rate-based rule nested inside a rule group.
        public let ruleGroupRuleName: String?
        /// The name of the rate-based rule to get the keys for. If you have the rule defined inside a rule group that you're using in your web ACL, also provide the name of the rule group reference statement in the request parameter RuleGroupRuleName.
        public let ruleName: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let webACLId: String
        /// The name of the web ACL. You cannot change the name of a web ACL after you create it.
        public let webACLName: String

        public init(ruleGroupRuleName: String? = nil, ruleName: String, scope: Scope, webACLId: String, webACLName: String) {
            self.ruleGroupRuleName = ruleGroupRuleName
            self.ruleName = ruleName
            self.scope = scope
            self.webACLId = webACLId
            self.webACLName = webACLName
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleGroupRuleName, name: "ruleGroupRuleName", parent: name, max: 128)
            try self.validate(self.ruleGroupRuleName, name: "ruleGroupRuleName", parent: name, min: 1)
            try self.validate(self.ruleGroupRuleName, name: "ruleGroupRuleName", parent: name, pattern: "^[\\w\\-]+$")
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[\\w\\-]+$")
            try self.validate(self.webACLId, name: "webACLId", parent: name, max: 36)
            try self.validate(self.webACLId, name: "webACLId", parent: name, min: 1)
            try self.validate(self.webACLId, name: "webACLId", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.webACLName, name: "webACLName", parent: name, max: 128)
            try self.validate(self.webACLName, name: "webACLName", parent: name, min: 1)
            try self.validate(self.webACLName, name: "webACLName", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case ruleGroupRuleName = "RuleGroupRuleName"
            case ruleName = "RuleName"
            case scope = "Scope"
            case webACLId = "WebACLId"
            case webACLName = "WebACLName"
        }
    }

    public struct GetRateBasedStatementManagedKeysResponse: AWSDecodableShape {
        /// The keys that are of Internet Protocol version 4 (IPv4).
        public let managedKeysIPV4: RateBasedStatementManagedKeysIPSet?
        /// The keys that are of Internet Protocol version 6 (IPv6).
        public let managedKeysIPV6: RateBasedStatementManagedKeysIPSet?

        public init(managedKeysIPV4: RateBasedStatementManagedKeysIPSet? = nil, managedKeysIPV6: RateBasedStatementManagedKeysIPSet? = nil) {
            self.managedKeysIPV4 = managedKeysIPV4
            self.managedKeysIPV6 = managedKeysIPV6
        }

        private enum CodingKeys: String, CodingKey {
            case managedKeysIPV4 = "ManagedKeysIPV4"
            case managedKeysIPV6 = "ManagedKeysIPV6"
        }
    }

    public struct GetRegexPatternSetRequest: AWSEncodableShape {
        /// A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// The name of the set. You cannot change the name after you create the set.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(id: String, name: String, scope: Scope) {
            self.id = id
            self.name = name
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case name = "Name"
            case scope = "Scope"
        }
    }

    public struct GetRegexPatternSetResponse: AWSDecodableShape {
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String?
        public let regexPatternSet: RegexPatternSet?

        public init(lockToken: String? = nil, regexPatternSet: RegexPatternSet? = nil) {
            self.lockToken = lockToken
            self.regexPatternSet = regexPatternSet
        }

        private enum CodingKeys: String, CodingKey {
            case lockToken = "LockToken"
            case regexPatternSet = "RegexPatternSet"
        }
    }

    public struct GetRuleGroupRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the entity.
        public let arn: String?
        /// A unique identifier for the rule group. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String?
        /// The name of the rule group. You cannot change the name of a rule group after you create it.
        public let name: String?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope?

        public init(arn: String? = nil, id: String? = nil, name: String? = nil, scope: Scope? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 2048)
            try self.validate(self.arn, name: "arn", parent: name, min: 20)
            try self.validate(self.arn, name: "arn", parent: name, pattern: "\\S")
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case id = "Id"
            case name = "Name"
            case scope = "Scope"
        }
    }

    public struct GetRuleGroupResponse: AWSDecodableShape {
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String?
        public let ruleGroup: RuleGroup?

        public init(lockToken: String? = nil, ruleGroup: RuleGroup? = nil) {
            self.lockToken = lockToken
            self.ruleGroup = ruleGroup
        }

        private enum CodingKeys: String, CodingKey {
            case lockToken = "LockToken"
            case ruleGroup = "RuleGroup"
        }
    }

    public struct GetSampledRequestsRequest: AWSEncodableShape {
        /// The number of requests that you want WAF to return from among the first 5,000 requests that your Amazon Web Services resource received during the time range. If your resource received fewer requests than the value of MaxItems, GetSampledRequests returns information about all of them.
        public let maxItems: Int64
        /// The metric name assigned to the Rule or RuleGroup for which you want a sample of requests.
        public let ruleMetricName: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// The start date and time and the end date and time of the range for which you want GetSampledRequests to return a sample of requests. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z". You can specify any time range in the previous three hours. If you specify a start time that's earlier than three hours ago, WAF sets it to three hours ago.
        public let timeWindow: TimeWindow
        /// The Amazon resource name (ARN) of the WebACL for which you want a sample of requests.
        public let webAclArn: String

        public init(maxItems: Int64 = 0, ruleMetricName: String, scope: Scope, timeWindow: TimeWindow, webAclArn: String) {
            self.maxItems = maxItems
            self.ruleMetricName = ruleMetricName
            self.scope = scope
            self.timeWindow = timeWindow
            self.webAclArn = webAclArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxItems, name: "maxItems", parent: name, max: 500)
            try self.validate(self.maxItems, name: "maxItems", parent: name, min: 1)
            try self.validate(self.ruleMetricName, name: "ruleMetricName", parent: name, max: 255)
            try self.validate(self.ruleMetricName, name: "ruleMetricName", parent: name, min: 1)
            try self.validate(self.ruleMetricName, name: "ruleMetricName", parent: name, pattern: "^[\\w#:\\.\\-/]+$")
            try self.validate(self.webAclArn, name: "webAclArn", parent: name, max: 2048)
            try self.validate(self.webAclArn, name: "webAclArn", parent: name, min: 20)
            try self.validate(self.webAclArn, name: "webAclArn", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case maxItems = "MaxItems"
            case ruleMetricName = "RuleMetricName"
            case scope = "Scope"
            case timeWindow = "TimeWindow"
            case webAclArn = "WebAclArn"
        }
    }

    public struct GetSampledRequestsResponse: AWSDecodableShape {
        /// The total number of requests from which GetSampledRequests got a sample of MaxItems requests. If PopulationSize is less than MaxItems, the sample includes every request that your Amazon Web Services resource received during the specified time range.
        public let populationSize: Int64?
        /// A complex type that contains detailed information about each of the requests in the sample.
        public let sampledRequests: [SampledHTTPRequest]?
        /// Usually, TimeWindow is the time range that you specified in the GetSampledRequests request. However, if your Amazon Web Services resource received more than 5,000 requests during the time range that you specified in the request, GetSampledRequests returns the time range for the first 5,000 requests. Times are in Coordinated Universal Time (UTC) format.
        public let timeWindow: TimeWindow?

        public init(populationSize: Int64? = nil, sampledRequests: [SampledHTTPRequest]? = nil, timeWindow: TimeWindow? = nil) {
            self.populationSize = populationSize
            self.sampledRequests = sampledRequests
            self.timeWindow = timeWindow
        }

        private enum CodingKeys: String, CodingKey {
            case populationSize = "PopulationSize"
            case sampledRequests = "SampledRequests"
            case timeWindow = "TimeWindow"
        }
    }

    public struct GetWebACLForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource whose web ACL you want to retrieve.  The ARN must be in one of the following formats:   For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id     For an Amazon API Gateway REST API: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name     For an AppSync GraphQL API: arn:aws:appsync:region:account-id:apis/GraphQLApiId     For an Amazon Cognito user pool: arn:aws:cognito-idp:region:account-id:userpool/user-pool-id
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct GetWebACLForResourceResponse: AWSDecodableShape {
        /// The web ACL that is associated with the resource. If there is no associated resource, WAF returns a null web ACL.
        public let webACL: WebACL?

        public init(webACL: WebACL? = nil) {
            self.webACL = webACL
        }

        private enum CodingKeys: String, CodingKey {
            case webACL = "WebACL"
        }
    }

    public struct GetWebACLRequest: AWSEncodableShape {
        /// The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// The name of the web ACL. You cannot change the name of a web ACL after you create it.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(id: String, name: String, scope: Scope) {
            self.id = id
            self.name = name
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case name = "Name"
            case scope = "Scope"
        }
    }

    public struct GetWebACLResponse: AWSDecodableShape {
        /// The URL to use in SDK integrations with Amazon Web Services managed rule groups. For example, you can use the integration SDKs with the account takeover prevention managed rule group AWSManagedRulesATPRuleSet. This is only populated if you are using a rule group in your web ACL that integrates with your applications in this way. For more information, see WAF client application integration in the WAF Developer Guide.
        public let applicationIntegrationURL: String?
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String?
        /// The web ACL specification. You can modify the settings in this web ACL and use it to update this web ACL or create a new one.
        public let webACL: WebACL?

        public init(applicationIntegrationURL: String? = nil, lockToken: String? = nil, webACL: WebACL? = nil) {
            self.applicationIntegrationURL = applicationIntegrationURL
            self.lockToken = lockToken
            self.webACL = webACL
        }

        private enum CodingKeys: String, CodingKey {
            case applicationIntegrationURL = "ApplicationIntegrationURL"
            case lockToken = "LockToken"
            case webACL = "WebACL"
        }
    }

    public struct HTTPHeader: AWSDecodableShape {
        /// The name of the HTTP header.
        public let name: String?
        /// The value of the HTTP header.
        public let value: String?

        public init(name: String? = nil, value: String? = nil) {
            self.name = name
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case value = "Value"
        }
    }

    public struct HTTPRequest: AWSDecodableShape {
        /// The IP address that the request originated from. If the web ACL is associated with a CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:    c-ip, if the viewer did not use an HTTP proxy or a load balancer to send the request    x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer to send the request
        public let clientIP: String?
        /// The two-letter country code for the country that the request originated from. For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2.
        public let country: String?
        /// A complex type that contains the name and value for each header in the sampled web request.
        public let headers: [HTTPHeader]?
        /// The HTTP version specified in the sampled web request, for example, HTTP/1.1.
        public let httpVersion: String?
        /// The HTTP method specified in the sampled web request.
        public let method: String?
        /// The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg.
        public let uri: String?

        public init(clientIP: String? = nil, country: String? = nil, headers: [HTTPHeader]? = nil, httpVersion: String? = nil, method: String? = nil, uri: String? = nil) {
            self.clientIP = clientIP
            self.country = country
            self.headers = headers
            self.httpVersion = httpVersion
            self.method = method
            self.uri = uri
        }

        private enum CodingKeys: String, CodingKey {
            case clientIP = "ClientIP"
            case country = "Country"
            case headers = "Headers"
            case httpVersion = "HTTPVersion"
            case method = "Method"
            case uri = "URI"
        }
    }

    public struct HeaderMatchPattern: AWSEncodableShape & AWSDecodableShape {
        /// Inspect all headers.
        public let all: All?
        /// Inspect only the headers whose keys don't match any of the strings specified here.
        public let excludedHeaders: [String]?
        /// Inspect only the headers that have a key that matches one of the strings specified here.
        public let includedHeaders: [String]?

        public init(all: All? = nil, excludedHeaders: [String]? = nil, includedHeaders: [String]? = nil) {
            self.all = all
            self.excludedHeaders = excludedHeaders
            self.includedHeaders = includedHeaders
        }

        public func validate(name: String) throws {
            try self.excludedHeaders?.forEach {
                try validate($0, name: "excludedHeaders[]", parent: name, max: 64)
                try validate($0, name: "excludedHeaders[]", parent: name, min: 1)
                try validate($0, name: "excludedHeaders[]", parent: name, pattern: "\\S")
            }
            try self.validate(self.excludedHeaders, name: "excludedHeaders", parent: name, max: 199)
            try self.validate(self.excludedHeaders, name: "excludedHeaders", parent: name, min: 1)
            try self.includedHeaders?.forEach {
                try validate($0, name: "includedHeaders[]", parent: name, max: 64)
                try validate($0, name: "includedHeaders[]", parent: name, min: 1)
                try validate($0, name: "includedHeaders[]", parent: name, pattern: "\\S")
            }
            try self.validate(self.includedHeaders, name: "includedHeaders", parent: name, max: 199)
            try self.validate(self.includedHeaders, name: "includedHeaders", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case all = "All"
            case excludedHeaders = "ExcludedHeaders"
            case includedHeaders = "IncludedHeaders"
        }
    }

    public struct Headers: AWSEncodableShape & AWSDecodableShape {
        /// The filter to use to identify the subset of headers to inspect in a web request.  You must specify exactly one setting: either All, IncludedHeaders, or ExcludedHeaders. Example JSON: "MatchPattern": { "ExcludedHeaders": {"KeyToExclude1", "KeyToExclude2"} }
        public let matchPattern: HeaderMatchPattern
        /// The parts of the headers to match with the rule inspection criteria. If you specify All, WAF inspects both keys and values.
        public let matchScope: MapMatchScope
        /// What WAF should do if the headers of the request are larger than WAF can inspect.  WAF does not support inspecting the entire contents of request headers  when they exceed 8 KB (8192 bytes) or 200 total headers. The underlying host service forwards a maximum of 200 headers and at most 8 KB of header contents to WAF.  The options for oversize handling are the following:    CONTINUE - Inspect the headers normally, according to the rule inspection criteria.     MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the request.    NO_MATCH - Treat the web request as not matching the rule statement.
        public let oversizeHandling: OversizeHandling

        public init(matchPattern: HeaderMatchPattern, matchScope: MapMatchScope, oversizeHandling: OversizeHandling) {
            self.matchPattern = matchPattern
            self.matchScope = matchScope
            self.oversizeHandling = oversizeHandling
        }

        public func validate(name: String) throws {
            try self.matchPattern.validate(name: "\(name).matchPattern")
        }

        private enum CodingKeys: String, CodingKey {
            case matchPattern = "MatchPattern"
            case matchScope = "MatchScope"
            case oversizeHandling = "OversizeHandling"
        }
    }

    public struct IPSet: AWSDecodableShape {
        /// Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses. All addresses must be specified using Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for /0.  Example address strings:    To configure WAF to allow, block, or count requests that originated from the IP address 192.0.2.44, specify 192.0.2.44/32.   To configure WAF to allow, block, or count requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify  192.0.2.0/24.   To configure WAF to allow, block, or count requests that originated from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128.   To configure WAF to allow, block, or count requests that originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify 1111:0000:0000:0000:0000:0000:0000:0000/64.   For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing. Example JSON Addresses specifications:    Empty array: "Addresses": []    Array with one address: "Addresses": ["192.0.2.44/32"]    Array with three addresses: "Addresses": ["192.0.2.44/32", "192.0.2.0/24", "192.0.0.0/16"]    INVALID specification: "Addresses": [""] INVALID
        public let addresses: [String]
        /// The Amazon Resource Name (ARN) of the entity.
        public let arn: String
        /// A description of the IP set that helps with identification.
        public let description: String?
        /// A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// The version of the IP addresses, either IPV4 or IPV6.
        public let ipAddressVersion: IPAddressVersion
        /// The name of the IP set. You cannot change the name of an IPSet after you create it.
        public let name: String

        public init(addresses: [String], arn: String, description: String? = nil, id: String, ipAddressVersion: IPAddressVersion, name: String) {
            self.addresses = addresses
            self.arn = arn
            self.description = description
            self.id = id
            self.ipAddressVersion = ipAddressVersion
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case addresses = "Addresses"
            case arn = "ARN"
            case description = "Description"
            case id = "Id"
            case ipAddressVersion = "IPAddressVersion"
            case name = "Name"
        }
    }

    public struct IPSetForwardedIPConfig: AWSEncodableShape & AWSDecodableShape {
        /// The match status to assign to the web request if the request doesn't have a valid IP address in the specified position.  If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.  You can specify the following fallback behaviors:    MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the request.    NO_MATCH - Treat the web request as not matching the rule statement.
        public let fallbackBehavior: FallbackBehavior
        /// The name of the HTTP header to use for the IP address. For example, to use the X-Forwarded-For (XFF) header, set this to X-Forwarded-For.  If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.
        public let headerName: String
        /// The position in the header to search for the IP address. The header can contain IP addresses of the original client and also of proxies. For example, the header value could be 10.1.1.1, 127.0.0.0, 10.10.10.10 where the first IP address identifies the original client and the rest identify proxies that the request went through.  The options for this setting are the following:    FIRST - Inspect the first IP address in the list of IP addresses in the header. This is usually the client's original IP.   LAST - Inspect the last IP address in the list of IP addresses in the header.   ANY - Inspect all IP addresses in the header for a match. If the header contains more than 10 IP addresses, WAF inspects the last 10.
        public let position: ForwardedIPPosition

        public init(fallbackBehavior: FallbackBehavior, headerName: String, position: ForwardedIPPosition) {
            self.fallbackBehavior = fallbackBehavior
            self.headerName = headerName
            self.position = position
        }

        public func validate(name: String) throws {
            try self.validate(self.headerName, name: "headerName", parent: name, max: 255)
            try self.validate(self.headerName, name: "headerName", parent: name, min: 1)
            try self.validate(self.headerName, name: "headerName", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case fallbackBehavior = "FallbackBehavior"
            case headerName = "HeaderName"
            case position = "Position"
        }
    }

    public struct IPSetReferenceStatement: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the IPSet that this statement references.
        public let arn: String
        /// The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.   If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.
        public let ipSetForwardedIPConfig: IPSetForwardedIPConfig?

        public init(arn: String, ipSetForwardedIPConfig: IPSetForwardedIPConfig? = nil) {
            self.arn = arn
            self.ipSetForwardedIPConfig = ipSetForwardedIPConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 2048)
            try self.validate(self.arn, name: "arn", parent: name, min: 20)
            try self.validate(self.arn, name: "arn", parent: name, pattern: "\\S")
            try self.ipSetForwardedIPConfig?.validate(name: "\(name).ipSetForwardedIPConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case ipSetForwardedIPConfig = "IPSetForwardedIPConfig"
        }
    }

    public struct IPSetSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the entity.
        public let arn: String?
        /// A description of the IP set that helps with identification.
        public let description: String?
        /// A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String?
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String?
        /// The name of the IP set. You cannot change the name of an IPSet after you create it.
        public let name: String?

        public init(arn: String? = nil, description: String? = nil, id: String? = nil, lockToken: String? = nil, name: String? = nil) {
            self.arn = arn
            self.description = description
            self.id = id
            self.lockToken = lockToken
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case description = "Description"
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
        }
    }

    public struct ImmunityTimeProperty: AWSEncodableShape & AWSDecodableShape {
        /// The amount of time, in seconds, that a CAPTCHA or challenge timestamp is considered valid by WAF. The default setting is 300.  For the Challenge action, the minimum setting is 300.
        public let immunityTime: Int64

        public init(immunityTime: Int64) {
            self.immunityTime = immunityTime
        }

        public func validate(name: String) throws {
            try self.validate(self.immunityTime, name: "immunityTime", parent: name, max: 259_200)
            try self.validate(self.immunityTime, name: "immunityTime", parent: name, min: 60)
        }

        private enum CodingKeys: String, CodingKey {
            case immunityTime = "ImmunityTime"
        }
    }

    public struct JsonBody: AWSEncodableShape & AWSDecodableShape {
        /// What WAF should do if it fails to completely parse the JSON body. The options are the following:    EVALUATE_AS_STRING - Inspect the body as plain text. WAF applies the text transformations and inspection criteria that you defined for the JSON inspection to the body text string.    MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the request.    NO_MATCH - Treat the web request as not matching the rule statement.   If you don't provide this setting, WAF parses and evaluates the content only up to the first parsing failure that it encounters.  WAF does its best to parse the entire JSON body, but might be forced to stop for reasons such as invalid characters, duplicate keys, truncation, and any content whose root node isn't an object or an array.  WAF parses the JSON in the following examples as two valid key, value pairs:    Missing comma: {"key1":"value1""key2":"value2"}    Missing colon: {"key1":"value1","key2""value2"}    Extra colons: {"key1"::"value1","key2""value2"}
        public let invalidFallbackBehavior: BodyParsingFallbackBehavior?
        /// The patterns to look for in the JSON body. WAF inspects the results of these pattern matches against the rule inspection criteria.
        public let matchPattern: JsonMatchPattern
        /// The parts of the JSON to match against using the MatchPattern. If you specify All, WAF matches against keys and values.
        public let matchScope: JsonMatchScope
        /// What WAF should do if the body is larger than WAF can inspect.  WAF does not support inspecting the entire contents of the body of a web request when the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body are forwarded to WAF by the underlying host service.  The options for oversize handling are the following:    CONTINUE - Inspect the body normally, according to the rule inspection criteria.     MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the request.    NO_MATCH - Treat the web request as not matching the rule statement.   You can combine the MATCH or NO_MATCH settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over 8 KB.  Default: CONTINUE
        public let oversizeHandling: OversizeHandling?

        public init(invalidFallbackBehavior: BodyParsingFallbackBehavior? = nil, matchPattern: JsonMatchPattern, matchScope: JsonMatchScope, oversizeHandling: OversizeHandling? = nil) {
            self.invalidFallbackBehavior = invalidFallbackBehavior
            self.matchPattern = matchPattern
            self.matchScope = matchScope
            self.oversizeHandling = oversizeHandling
        }

        public func validate(name: String) throws {
            try self.matchPattern.validate(name: "\(name).matchPattern")
        }

        private enum CodingKeys: String, CodingKey {
            case invalidFallbackBehavior = "InvalidFallbackBehavior"
            case matchPattern = "MatchPattern"
            case matchScope = "MatchScope"
            case oversizeHandling = "OversizeHandling"
        }
    }

    public struct JsonMatchPattern: AWSEncodableShape & AWSDecodableShape {
        /// Match all of the elements. See also MatchScope in JsonBody.  You must specify either this setting or the IncludedPaths setting, but not both.
        public let all: All?
        /// Match only the specified include paths. See also MatchScope in JsonBody.  Provide the include paths using JSON Pointer syntax. For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"]. For information about this syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer.  You must specify either this setting or the All setting, but not both.  Don't use this option to include all paths. Instead, use the All setting.
        public let includedPaths: [String]?

        public init(all: All? = nil, includedPaths: [String]? = nil) {
            self.all = all
            self.includedPaths = includedPaths
        }

        public func validate(name: String) throws {
            try self.includedPaths?.forEach {
                try validate($0, name: "includedPaths[]", parent: name, max: 512)
                try validate($0, name: "includedPaths[]", parent: name, min: 1)
                try validate($0, name: "includedPaths[]", parent: name, pattern: "^([/])|([/](([^~])|(~[01]))+)$")
            }
            try self.validate(self.includedPaths, name: "includedPaths", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case all = "All"
            case includedPaths = "IncludedPaths"
        }
    }

    public struct Label: AWSEncodableShape & AWSDecodableShape {
        /// The label string.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[0-9A-Za-z_\\-:]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct LabelMatchStatement: AWSEncodableShape & AWSDecodableShape {
        /// The string to match against. The setting you provide for this depends on the match statement's Scope setting:    If the Scope indicates LABEL, then this specification must include the name and can include any number of preceding namespace specifications and prefix up to providing the fully qualified label name.    If the Scope indicates NAMESPACE, then this specification can include any number of contiguous namespace strings, and can include the entire label namespace prefix from the rule group or web ACL where the label originates.   Labels are case sensitive and components of a label must be separated by colon, for example NS1:NS2:name.
        public let key: String
        /// Specify whether you want to match using the label name or just the namespace.
        public let scope: LabelMatchScope

        public init(key: String, scope: LabelMatchScope) {
            self.key = key
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 1024)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^[0-9A-Za-z_\\-:]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case scope = "Scope"
        }
    }

    public struct LabelNameCondition: AWSEncodableShape & AWSDecodableShape {
        /// The label name that a log record must contain in order to meet the condition. This must be a fully qualified label name. Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label.
        public let labelName: String

        public init(labelName: String) {
            self.labelName = labelName
        }

        public func validate(name: String) throws {
            try self.validate(self.labelName, name: "labelName", parent: name, max: 1024)
            try self.validate(self.labelName, name: "labelName", parent: name, min: 1)
            try self.validate(self.labelName, name: "labelName", parent: name, pattern: "^[0-9A-Za-z_\\-:]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case labelName = "LabelName"
        }
    }

    public struct LabelSummary: AWSDecodableShape {
        /// An individual label specification.
        public let name: String?

        public init(name: String? = nil) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct ListAvailableManagedRuleGroupVersionsRequest: AWSEncodableShape {
        /// The maximum number of objects that you want WAF to return for this request. If more  objects are available, in the response, WAF provides a  NextMarker value that you can use in a subsequent call to get the next batch of objects.
        public let limit: Int?
        /// The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.
        public let name: String
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// The name of the managed rule group vendor. You use this, along with the rule group name, to identify the rule group.
        public let vendorName: String

        public init(limit: Int? = nil, name: String, nextMarker: String? = nil, scope: Scope, vendorName: String) {
            self.limit = limit
            self.name = name
            self.nextMarker = nextMarker
            self.scope = scope
            self.vendorName = vendorName
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, max: 256)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, pattern: "\\S")
            try self.validate(self.vendorName, name: "vendorName", parent: name, max: 128)
            try self.validate(self.vendorName, name: "vendorName", parent: name, min: 1)
            try self.validate(self.vendorName, name: "vendorName", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case name = "Name"
            case nextMarker = "NextMarker"
            case scope = "Scope"
            case vendorName = "VendorName"
        }
    }

    public struct ListAvailableManagedRuleGroupVersionsResponse: AWSDecodableShape {
        /// The name of the version that's currently set as the default.
        public let currentDefaultVersion: String?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// The versions that are currently available for the specified managed rule group.
        public let versions: [ManagedRuleGroupVersion]?

        public init(currentDefaultVersion: String? = nil, nextMarker: String? = nil, versions: [ManagedRuleGroupVersion]? = nil) {
            self.currentDefaultVersion = currentDefaultVersion
            self.nextMarker = nextMarker
            self.versions = versions
        }

        private enum CodingKeys: String, CodingKey {
            case currentDefaultVersion = "CurrentDefaultVersion"
            case nextMarker = "NextMarker"
            case versions = "Versions"
        }
    }

    public struct ListAvailableManagedRuleGroupsRequest: AWSEncodableShape {
        /// The maximum number of objects that you want WAF to return for this request. If more  objects are available, in the response, WAF provides a  NextMarker value that you can use in a subsequent call to get the next batch of objects.
        public let limit: Int?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(limit: Int? = nil, nextMarker: String? = nil, scope: Scope) {
            self.limit = limit
            self.nextMarker = nextMarker
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, max: 256)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextMarker = "NextMarker"
            case scope = "Scope"
        }
    }

    public struct ListAvailableManagedRuleGroupsResponse: AWSDecodableShape {
        public let managedRuleGroups: [ManagedRuleGroupSummary]?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?

        public init(managedRuleGroups: [ManagedRuleGroupSummary]? = nil, nextMarker: String? = nil) {
            self.managedRuleGroups = managedRuleGroups
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case managedRuleGroups = "ManagedRuleGroups"
            case nextMarker = "NextMarker"
        }
    }

    public struct ListIPSetsRequest: AWSEncodableShape {
        /// The maximum number of objects that you want WAF to return for this request. If more  objects are available, in the response, WAF provides a  NextMarker value that you can use in a subsequent call to get the next batch of objects.
        public let limit: Int?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(limit: Int? = nil, nextMarker: String? = nil, scope: Scope) {
            self.limit = limit
            self.nextMarker = nextMarker
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, max: 256)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextMarker = "NextMarker"
            case scope = "Scope"
        }
    }

    public struct ListIPSetsResponse: AWSDecodableShape {
        /// Array of IPSets. This may not be the full list of IPSets that you have defined. See the Limit specification for this request.
        public let ipSets: [IPSetSummary]?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?

        public init(ipSets: [IPSetSummary]? = nil, nextMarker: String? = nil) {
            self.ipSets = ipSets
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case ipSets = "IPSets"
            case nextMarker = "NextMarker"
        }
    }

    public struct ListLoggingConfigurationsRequest: AWSEncodableShape {
        /// The maximum number of objects that you want WAF to return for this request. If more  objects are available, in the response, WAF provides a  NextMarker value that you can use in a subsequent call to get the next batch of objects.
        public let limit: Int?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(limit: Int? = nil, nextMarker: String? = nil, scope: Scope) {
            self.limit = limit
            self.nextMarker = nextMarker
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, max: 256)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextMarker = "NextMarker"
            case scope = "Scope"
        }
    }

    public struct ListLoggingConfigurationsResponse: AWSDecodableShape {
        public let loggingConfigurations: [LoggingConfiguration]?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?

        public init(loggingConfigurations: [LoggingConfiguration]? = nil, nextMarker: String? = nil) {
            self.loggingConfigurations = loggingConfigurations
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case loggingConfigurations = "LoggingConfigurations"
            case nextMarker = "NextMarker"
        }
    }

    public struct ListManagedRuleSetsRequest: AWSEncodableShape {
        /// The maximum number of objects that you want WAF to return for this request. If more  objects are available, in the response, WAF provides a  NextMarker value that you can use in a subsequent call to get the next batch of objects.
        public let limit: Int?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(limit: Int? = nil, nextMarker: String? = nil, scope: Scope) {
            self.limit = limit
            self.nextMarker = nextMarker
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, max: 256)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextMarker = "NextMarker"
            case scope = "Scope"
        }
    }

    public struct ListManagedRuleSetsResponse: AWSDecodableShape {
        /// Your managed rule sets.
        public let managedRuleSets: [ManagedRuleSetSummary]?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?

        public init(managedRuleSets: [ManagedRuleSetSummary]? = nil, nextMarker: String? = nil) {
            self.managedRuleSets = managedRuleSets
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case managedRuleSets = "ManagedRuleSets"
            case nextMarker = "NextMarker"
        }
    }

    public struct ListMobileSdkReleasesRequest: AWSEncodableShape {
        /// The maximum number of objects that you want WAF to return for this request. If more  objects are available, in the response, WAF provides a  NextMarker value that you can use in a subsequent call to get the next batch of objects.
        public let limit: Int?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// The device platform to retrieve the list for.
        public let platform: Platform

        public init(limit: Int? = nil, nextMarker: String? = nil, platform: Platform) {
            self.limit = limit
            self.nextMarker = nextMarker
            self.platform = platform
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, max: 256)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextMarker = "NextMarker"
            case platform = "Platform"
        }
    }

    public struct ListMobileSdkReleasesResponse: AWSDecodableShape {
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// High level information for the available SDK releases.
        public let releaseSummaries: [ReleaseSummary]?

        public init(nextMarker: String? = nil, releaseSummaries: [ReleaseSummary]? = nil) {
            self.nextMarker = nextMarker
            self.releaseSummaries = releaseSummaries
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "NextMarker"
            case releaseSummaries = "ReleaseSummaries"
        }
    }

    public struct ListRegexPatternSetsRequest: AWSEncodableShape {
        /// The maximum number of objects that you want WAF to return for this request. If more  objects are available, in the response, WAF provides a  NextMarker value that you can use in a subsequent call to get the next batch of objects.
        public let limit: Int?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(limit: Int? = nil, nextMarker: String? = nil, scope: Scope) {
            self.limit = limit
            self.nextMarker = nextMarker
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, max: 256)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextMarker = "NextMarker"
            case scope = "Scope"
        }
    }

    public struct ListRegexPatternSetsResponse: AWSDecodableShape {
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        public let regexPatternSets: [RegexPatternSetSummary]?

        public init(nextMarker: String? = nil, regexPatternSets: [RegexPatternSetSummary]? = nil) {
            self.nextMarker = nextMarker
            self.regexPatternSets = regexPatternSets
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "NextMarker"
            case regexPatternSets = "RegexPatternSets"
        }
    }

    public struct ListResourcesForWebACLRequest: AWSEncodableShape {
        /// Used for web ACLs that are scoped for regional applications. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   If you don't provide a resource type, the call uses the resource type APPLICATION_LOAD_BALANCER.   Default: APPLICATION_LOAD_BALANCER
        public let resourceType: ResourceType?
        /// The Amazon Resource Name (ARN) of the web ACL.
        public let webACLArn: String

        public init(resourceType: ResourceType? = nil, webACLArn: String) {
            self.resourceType = resourceType
            self.webACLArn = webACLArn
        }

        public func validate(name: String) throws {
            try self.validate(self.webACLArn, name: "webACLArn", parent: name, max: 2048)
            try self.validate(self.webACLArn, name: "webACLArn", parent: name, min: 20)
            try self.validate(self.webACLArn, name: "webACLArn", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceType = "ResourceType"
            case webACLArn = "WebACLArn"
        }
    }

    public struct ListResourcesForWebACLResponse: AWSDecodableShape {
        /// The array of Amazon Resource Names (ARNs) of the associated resources.
        public let resourceArns: [String]?

        public init(resourceArns: [String]? = nil) {
            self.resourceArns = resourceArns
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArns = "ResourceArns"
        }
    }

    public struct ListRuleGroupsRequest: AWSEncodableShape {
        /// The maximum number of objects that you want WAF to return for this request. If more  objects are available, in the response, WAF provides a  NextMarker value that you can use in a subsequent call to get the next batch of objects.
        public let limit: Int?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(limit: Int? = nil, nextMarker: String? = nil, scope: Scope) {
            self.limit = limit
            self.nextMarker = nextMarker
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, max: 256)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextMarker = "NextMarker"
            case scope = "Scope"
        }
    }

    public struct ListRuleGroupsResponse: AWSDecodableShape {
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        public let ruleGroups: [RuleGroupSummary]?

        public init(nextMarker: String? = nil, ruleGroups: [RuleGroupSummary]? = nil) {
            self.nextMarker = nextMarker
            self.ruleGroups = ruleGroups
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "NextMarker"
            case ruleGroups = "RuleGroups"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The maximum number of objects that you want WAF to return for this request. If more  objects are available, in the response, WAF provides a  NextMarker value that you can use in a subsequent call to get the next batch of objects.
        public let limit: Int?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceARN: String

        public init(limit: Int? = nil, nextMarker: String? = nil, resourceARN: String) {
            self.limit = limit
            self.nextMarker = nextMarker
            self.resourceARN = resourceARN
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, max: 256)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, pattern: "\\S")
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 20)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextMarker = "NextMarker"
            case resourceARN = "ResourceARN"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// The collection of tagging definitions for the resource.
        public let tagInfoForResource: TagInfoForResource?

        public init(nextMarker: String? = nil, tagInfoForResource: TagInfoForResource? = nil) {
            self.nextMarker = nextMarker
            self.tagInfoForResource = tagInfoForResource
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "NextMarker"
            case tagInfoForResource = "TagInfoForResource"
        }
    }

    public struct ListWebACLsRequest: AWSEncodableShape {
        /// The maximum number of objects that you want WAF to return for this request. If more  objects are available, in the response, WAF provides a  NextMarker value that you can use in a subsequent call to get the next batch of objects.
        public let limit: Int?
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(limit: Int? = nil, nextMarker: String? = nil, scope: Scope) {
            self.limit = limit
            self.nextMarker = nextMarker
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, max: 256)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, min: 1)
            try self.validate(self.nextMarker, name: "nextMarker", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextMarker = "NextMarker"
            case scope = "Scope"
        }
    }

    public struct ListWebACLsResponse: AWSDecodableShape {
        /// When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker  value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
        public let nextMarker: String?
        public let webACLs: [WebACLSummary]?

        public init(nextMarker: String? = nil, webACLs: [WebACLSummary]? = nil) {
            self.nextMarker = nextMarker
            self.webACLs = webACLs
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "NextMarker"
            case webACLs = "WebACLs"
        }
    }

    public struct LoggingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The logging destination configuration that you want to associate with the web ACL.  You can associate one logging destination to a web ACL.
        public let logDestinationConfigs: [String]
        /// Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.
        public let loggingFilter: LoggingFilter?
        /// Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.
        public let managedByFirewallManager: Bool?
        /// The parts of the request that you want to keep out of the logs. For example, if you redact the SingleHeader field, the HEADER field in the logs will be xxx.   You can specify only the following fields for redaction: UriPath, QueryString, SingleHeader, Method, and JsonBody.
        public let redactedFields: [FieldToMatch]?
        /// The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs.
        public let resourceArn: String

        public init(logDestinationConfigs: [String], loggingFilter: LoggingFilter? = nil, managedByFirewallManager: Bool? = nil, redactedFields: [FieldToMatch]? = nil, resourceArn: String) {
            self.logDestinationConfigs = logDestinationConfigs
            self.loggingFilter = loggingFilter
            self.managedByFirewallManager = managedByFirewallManager
            self.redactedFields = redactedFields
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.logDestinationConfigs.forEach {
                try validate($0, name: "logDestinationConfigs[]", parent: name, max: 2048)
                try validate($0, name: "logDestinationConfigs[]", parent: name, min: 20)
                try validate($0, name: "logDestinationConfigs[]", parent: name, pattern: "\\S")
            }
            try self.validate(self.logDestinationConfigs, name: "logDestinationConfigs", parent: name, max: 100)
            try self.validate(self.logDestinationConfigs, name: "logDestinationConfigs", parent: name, min: 1)
            try self.loggingFilter?.validate(name: "\(name).loggingFilter")
            try self.redactedFields?.forEach {
                try $0.validate(name: "\(name).redactedFields[]")
            }
            try self.validate(self.redactedFields, name: "redactedFields", parent: name, max: 100)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case logDestinationConfigs = "LogDestinationConfigs"
            case loggingFilter = "LoggingFilter"
            case managedByFirewallManager = "ManagedByFirewallManager"
            case redactedFields = "RedactedFields"
            case resourceArn = "ResourceArn"
        }
    }

    public struct LoggingFilter: AWSEncodableShape & AWSDecodableShape {
        /// Default handling for logs that don't match any of the specified filtering conditions.
        public let defaultBehavior: FilterBehavior
        /// The filters that you want to apply to the logs.
        public let filters: [Filter]

        public init(defaultBehavior: FilterBehavior, filters: [Filter]) {
            self.defaultBehavior = defaultBehavior
            self.filters = filters
        }

        public func validate(name: String) throws {
            try self.filters.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case defaultBehavior = "DefaultBehavior"
            case filters = "Filters"
        }
    }

    public struct ManagedRuleGroupConfig: AWSEncodableShape & AWSDecodableShape {
        /// Additional configuration for using the Bot Control managed rule group. Use this to specify the  inspection level that you want to use. For information  about using the Bot Control managed rule group, see WAF Bot Control rule group  and WAF Bot Control in the WAF Developer Guide.
        public let awsManagedRulesBotControlRuleSet: AWSManagedRulesBotControlRuleSet?
        /// The path of the login endpoint for your application. For example, for the URL https://example.com/web/login, you would provide the path /web/login.
        public let loginPath: String?
        /// Details about your login page password field.
        public let passwordField: PasswordField?
        /// The payload type for your login endpoint, either JSON or form encoded.
        public let payloadType: PayloadType?
        /// Details about your login page username field.
        public let usernameField: UsernameField?

        public init(awsManagedRulesBotControlRuleSet: AWSManagedRulesBotControlRuleSet? = nil, loginPath: String? = nil, passwordField: PasswordField? = nil, payloadType: PayloadType? = nil, usernameField: UsernameField? = nil) {
            self.awsManagedRulesBotControlRuleSet = awsManagedRulesBotControlRuleSet
            self.loginPath = loginPath
            self.passwordField = passwordField
            self.payloadType = payloadType
            self.usernameField = usernameField
        }

        public func validate(name: String) throws {
            try self.validate(self.loginPath, name: "loginPath", parent: name, max: 256)
            try self.validate(self.loginPath, name: "loginPath", parent: name, min: 1)
            try self.validate(self.loginPath, name: "loginPath", parent: name, pattern: "\\S")
            try self.passwordField?.validate(name: "\(name).passwordField")
            try self.usernameField?.validate(name: "\(name).usernameField")
        }

        private enum CodingKeys: String, CodingKey {
            case awsManagedRulesBotControlRuleSet = "AWSManagedRulesBotControlRuleSet"
            case loginPath = "LoginPath"
            case passwordField = "PasswordField"
            case payloadType = "PayloadType"
            case usernameField = "UsernameField"
        }
    }

    public final class ManagedRuleGroupStatement: AWSEncodableShape & AWSDecodableShape {
        /// Rules in the referenced rule group whose actions are set to Count.   Instead of this option, use RuleActionOverrides. It accepts any valid action setting, including Count.
        public let excludedRules: [ExcludedRule]?
        /// Additional information that's used by a managed rule group. Many managed rule groups don't require this. Use the AWSManagedRulesBotControlRuleSet configuration object to configure the  protection level that you want the Bot Control rule group to use.
        public let managedRuleGroupConfigs: [ManagedRuleGroupConfig]?
        /// The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.
        public let name: String
        /// Action settings to use in the place of the rule actions that are configured inside the rule group. You specify one override for each rule whose action you want to change.  You can use overrides for testing, for example you can override all of rule actions to Count and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.
        public let ruleActionOverrides: [RuleActionOverride]?
        /// An optional nested statement that narrows the scope of the web requests that are evaluated by the managed rule group. Requests are only evaluated by the rule group if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.
        public let scopeDownStatement: Statement?
        /// The name of the managed rule group vendor. You use this, along with the rule group name, to identify the rule group.
        public let vendorName: String
        /// The version of the managed rule group to use. If you specify this, the version setting is fixed until you change it. If you don't specify this, WAF uses the vendor's default version, and then keeps the version at the vendor's default when the vendor updates the managed rule group settings.
        public let version: String?

        public init(excludedRules: [ExcludedRule]? = nil, managedRuleGroupConfigs: [ManagedRuleGroupConfig]? = nil, name: String, ruleActionOverrides: [RuleActionOverride]? = nil, scopeDownStatement: Statement? = nil, vendorName: String, version: String? = nil) {
            self.excludedRules = excludedRules
            self.managedRuleGroupConfigs = managedRuleGroupConfigs
            self.name = name
            self.ruleActionOverrides = ruleActionOverrides
            self.scopeDownStatement = scopeDownStatement
            self.vendorName = vendorName
            self.version = version
        }

        public func validate(name: String) throws {
            try self.excludedRules?.forEach {
                try $0.validate(name: "\(name).excludedRules[]")
            }
            try self.validate(self.excludedRules, name: "excludedRules", parent: name, max: 100)
            try self.managedRuleGroupConfigs?.forEach {
                try $0.validate(name: "\(name).managedRuleGroupConfigs[]")
            }
            try self.validate(self.managedRuleGroupConfigs, name: "managedRuleGroupConfigs", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.ruleActionOverrides?.forEach {
                try $0.validate(name: "\(name).ruleActionOverrides[]")
            }
            try self.validate(self.ruleActionOverrides, name: "ruleActionOverrides", parent: name, max: 100)
            try self.validate(self.ruleActionOverrides, name: "ruleActionOverrides", parent: name, min: 1)
            try self.scopeDownStatement?.validate(name: "\(name).scopeDownStatement")
            try self.validate(self.vendorName, name: "vendorName", parent: name, max: 128)
            try self.validate(self.vendorName, name: "vendorName", parent: name, min: 1)
            try self.validate(self.vendorName, name: "vendorName", parent: name, pattern: "\\S")
            try self.validate(self.version, name: "version", parent: name, max: 64)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[\\w#:\\.\\-/]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case excludedRules = "ExcludedRules"
            case managedRuleGroupConfigs = "ManagedRuleGroupConfigs"
            case name = "Name"
            case ruleActionOverrides = "RuleActionOverrides"
            case scopeDownStatement = "ScopeDownStatement"
            case vendorName = "VendorName"
            case version = "Version"
        }
    }

    public struct ManagedRuleGroupSummary: AWSDecodableShape {
        /// The description of the managed rule group, provided by Amazon Web Services Managed Rules or the Amazon Web Services Marketplace seller who manages it.
        public let description: String?
        /// The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.
        public let name: String?
        /// The name of the managed rule group vendor. You use this, along with the rule group name, to identify the rule group.
        public let vendorName: String?
        /// Indicates whether the managed rule group is versioned. If it is, you can retrieve the versions list by calling ListAvailableManagedRuleGroupVersions.
        public let versioningSupported: Bool?

        public init(description: String? = nil, name: String? = nil, vendorName: String? = nil, versioningSupported: Bool? = nil) {
            self.description = description
            self.name = name
            self.vendorName = vendorName
            self.versioningSupported = versioningSupported
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
            case vendorName = "VendorName"
            case versioningSupported = "VersioningSupported"
        }
    }

    public struct ManagedRuleGroupVersion: AWSDecodableShape {
        /// The date and time that the managed rule group owner updated the rule group version information.
        public let lastUpdateTimestamp: Date?
        /// The version name.
        public let name: String?

        public init(lastUpdateTimestamp: Date? = nil, name: String? = nil) {
            self.lastUpdateTimestamp = lastUpdateTimestamp
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case lastUpdateTimestamp = "LastUpdateTimestamp"
            case name = "Name"
        }
    }

    public struct ManagedRuleSet: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the entity.
        public let arn: String
        /// A description of the set that helps with identification.
        public let description: String?
        /// A unique identifier for the managed rule set. The ID is returned in the responses to commands like list. You provide it to operations like get and update.
        public let id: String
        /// The label namespace prefix for the managed rule groups that are offered to customers from this managed rule set. All labels that are added by rules in the managed rule group have this prefix.    The syntax for the label namespace prefix for a managed rule group is the following:   awswaf:managed:::   When a rule with a label matches a web request, WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon:   :
        public let labelNamespace: String?
        /// The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set. This name is assigned to the corresponding managed rule group, which your customers can access and use.
        public let name: String
        /// The versions of this managed rule set that are available for use by customers.
        public let publishedVersions: [String: ManagedRuleSetVersion]?
        /// The version that you would like your customers to use.
        public let recommendedVersion: String?

        public init(arn: String, description: String? = nil, id: String, labelNamespace: String? = nil, name: String, publishedVersions: [String: ManagedRuleSetVersion]? = nil, recommendedVersion: String? = nil) {
            self.arn = arn
            self.description = description
            self.id = id
            self.labelNamespace = labelNamespace
            self.name = name
            self.publishedVersions = publishedVersions
            self.recommendedVersion = recommendedVersion
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case description = "Description"
            case id = "Id"
            case labelNamespace = "LabelNamespace"
            case name = "Name"
            case publishedVersions = "PublishedVersions"
            case recommendedVersion = "RecommendedVersion"
        }
    }

    public struct ManagedRuleSetSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the entity.
        public let arn: String?
        /// A description of the set that helps with identification.
        public let description: String?
        /// A unique identifier for the managed rule set. The ID is returned in the responses to commands like list. You provide it to operations like get and update.
        public let id: String?
        /// The label namespace prefix for the managed rule groups that are offered to customers from this managed rule set. All labels that are added by rules in the managed rule group have this prefix.    The syntax for the label namespace prefix for a managed rule group is the following:   awswaf:managed:::   When a rule with a label matches a web request, WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon:   :
        public let labelNamespace: String?
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String?
        /// The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set. This name is assigned to the corresponding managed rule group, which your customers can access and use.
        public let name: String?

        public init(arn: String? = nil, description: String? = nil, id: String? = nil, labelNamespace: String? = nil, lockToken: String? = nil, name: String? = nil) {
            self.arn = arn
            self.description = description
            self.id = id
            self.labelNamespace = labelNamespace
            self.lockToken = lockToken
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case description = "Description"
            case id = "Id"
            case labelNamespace = "LabelNamespace"
            case lockToken = "LockToken"
            case name = "Name"
        }
    }

    public struct ManagedRuleSetVersion: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the vendor rule group that's used to define the published version of your managed rule group.
        public let associatedRuleGroupArn: String?
        /// The web ACL capacity units (WCUs) required for this rule group. WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule.  Simple rules that cost little to run use fewer WCUs than more complex rules
        /// 				that use more processing power.
        /// 				Rule group capacity is fixed at creation, which helps users plan their   web ACL WCU usage when they use a rule group.  The WCU limit for web ACLs is 1,500.
        public let capacity: Int64?
        /// The time that this version is set to expire. Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z".
        public let expiryTimestamp: Date?
        /// The amount of time you expect this version of your managed rule group to last, in days.
        public let forecastedLifetime: Int?
        /// The last time that you updated this version.  Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z".
        public let lastUpdateTimestamp: Date?
        /// The time that you first published this version.  Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z".
        public let publishTimestamp: Date?

        public init(associatedRuleGroupArn: String? = nil, capacity: Int64? = nil, expiryTimestamp: Date? = nil, forecastedLifetime: Int? = nil, lastUpdateTimestamp: Date? = nil, publishTimestamp: Date? = nil) {
            self.associatedRuleGroupArn = associatedRuleGroupArn
            self.capacity = capacity
            self.expiryTimestamp = expiryTimestamp
            self.forecastedLifetime = forecastedLifetime
            self.lastUpdateTimestamp = lastUpdateTimestamp
            self.publishTimestamp = publishTimestamp
        }

        private enum CodingKeys: String, CodingKey {
            case associatedRuleGroupArn = "AssociatedRuleGroupArn"
            case capacity = "Capacity"
            case expiryTimestamp = "ExpiryTimestamp"
            case forecastedLifetime = "ForecastedLifetime"
            case lastUpdateTimestamp = "LastUpdateTimestamp"
            case publishTimestamp = "PublishTimestamp"
        }
    }

    public struct Method: AWSEncodableShape & AWSDecodableShape {
        public init() {}
    }

    public struct MobileSdkRelease: AWSDecodableShape {
        /// Notes describing the release.
        public let releaseNotes: String?
        /// The release version.
        public let releaseVersion: String?
        /// Tags that are associated with the release.
        public let tags: [Tag]?
        /// The timestamp of the release.
        public let timestamp: Date?

        public init(releaseNotes: String? = nil, releaseVersion: String? = nil, tags: [Tag]? = nil, timestamp: Date? = nil) {
            self.releaseNotes = releaseNotes
            self.releaseVersion = releaseVersion
            self.tags = tags
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case releaseNotes = "ReleaseNotes"
            case releaseVersion = "ReleaseVersion"
            case tags = "Tags"
            case timestamp = "Timestamp"
        }
    }

    public struct NoneAction: AWSEncodableShape & AWSDecodableShape {
        public init() {}
    }

    public final class NotStatement: AWSEncodableShape & AWSDecodableShape {
        /// The statement to negate. You can use any statement that can be nested.
        public let statement: Statement

        public init(statement: Statement) {
            self.statement = statement
        }

        public func validate(name: String) throws {
            try self.statement.validate(name: "\(name).statement")
        }

        private enum CodingKeys: String, CodingKey {
            case statement = "Statement"
        }
    }

    public struct OrStatement: AWSEncodableShape & AWSDecodableShape {
        /// The statements to combine with OR logic. You can use any statements that can be nested.
        public let statements: [Statement]

        public init(statements: [Statement]) {
            self.statements = statements
        }

        public func validate(name: String) throws {
            try self.statements.forEach {
                try $0.validate(name: "\(name).statements[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case statements = "Statements"
        }
    }

    public struct OverrideAction: AWSEncodableShape & AWSDecodableShape {
        /// Override the rule group evaluation result to count only.   This option is usually set to none. It does not affect how the rules in the rule group are evaluated. If you want the rules in the rule group to only count   matches, do not use this and instead use the rule action override option, with Count action, in your rule group reference statement settings.
        public let count: CountAction?
        /// Don't override the rule group evaluation result. This is the most common setting.
        public let none: NoneAction?

        public init(count: CountAction? = nil, none: NoneAction? = nil) {
            self.count = count
            self.none = none
        }

        public func validate(name: String) throws {
            try self.count?.validate(name: "\(name).count")
        }

        private enum CodingKeys: String, CodingKey {
            case count = "Count"
            case none = "None"
        }
    }

    public struct PasswordField: AWSEncodableShape & AWSDecodableShape {
        /// The name of the password field. For example /form/password.
        public let identifier: String

        public init(identifier: String) {
            self.identifier = identifier
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 512)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 1)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
        }
    }

    public struct PutLoggingConfigurationRequest: AWSEncodableShape {
        public let loggingConfiguration: LoggingConfiguration

        public init(loggingConfiguration: LoggingConfiguration) {
            self.loggingConfiguration = loggingConfiguration
        }

        public func validate(name: String) throws {
            try self.loggingConfiguration.validate(name: "\(name).loggingConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case loggingConfiguration = "LoggingConfiguration"
        }
    }

    public struct PutLoggingConfigurationResponse: AWSDecodableShape {
        public let loggingConfiguration: LoggingConfiguration?

        public init(loggingConfiguration: LoggingConfiguration? = nil) {
            self.loggingConfiguration = loggingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case loggingConfiguration = "LoggingConfiguration"
        }
    }

    public struct PutManagedRuleSetVersionsRequest: AWSEncodableShape {
        /// A unique identifier for the managed rule set. The ID is returned in the responses to commands like list. You provide it to operations like get and update.
        public let id: String
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String
        /// The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set. This name is assigned to the corresponding managed rule group, which your customers can access and use.
        public let name: String
        /// The version of the named managed rule group that you'd like your customers to choose, from among your version offerings.
        public let recommendedVersion: String?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// The versions of the named managed rule group that you want to offer to your customers.
        public let versionsToPublish: [String: VersionToPublish]?

        public init(id: String, lockToken: String, name: String, recommendedVersion: String? = nil, scope: Scope, versionsToPublish: [String: VersionToPublish]? = nil) {
            self.id = id
            self.lockToken = lockToken
            self.name = name
            self.recommendedVersion = recommendedVersion
            self.scope = scope
            self.versionsToPublish = versionsToPublish
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.lockToken, name: "lockToken", parent: name, max: 36)
            try self.validate(self.lockToken, name: "lockToken", parent: name, min: 1)
            try self.validate(self.lockToken, name: "lockToken", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.validate(self.recommendedVersion, name: "recommendedVersion", parent: name, max: 64)
            try self.validate(self.recommendedVersion, name: "recommendedVersion", parent: name, min: 1)
            try self.validate(self.recommendedVersion, name: "recommendedVersion", parent: name, pattern: "^[\\w#:\\.\\-/]+$")
            try self.versionsToPublish?.forEach {
                try validate($0.key, name: "versionsToPublish.key", parent: name, max: 64)
                try validate($0.key, name: "versionsToPublish.key", parent: name, min: 1)
                try validate($0.key, name: "versionsToPublish.key", parent: name, pattern: "^[\\w#:\\.\\-/]+$")
                try $0.value.validate(name: "\(name).versionsToPublish[\"\($0.key)\"]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
            case recommendedVersion = "RecommendedVersion"
            case scope = "Scope"
            case versionsToPublish = "VersionsToPublish"
        }
    }

    public struct PutManagedRuleSetVersionsResponse: AWSDecodableShape {
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let nextLockToken: String?

        public init(nextLockToken: String? = nil) {
            self.nextLockToken = nextLockToken
        }

        private enum CodingKeys: String, CodingKey {
            case nextLockToken = "NextLockToken"
        }
    }

    public struct PutPermissionPolicyRequest: AWSEncodableShape {
        /// The policy to attach to the specified rule group.  The policy specifications must conform to the following:   The policy must be composed using IAM Policy version 2012-10-17 or version 2015-01-01.   The policy must include specifications for Effect, Action, and Principal.    Effect must specify Allow.    Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and  wafv2:PutFirewallManagerRuleGroups and may optionally specify wafv2:GetRuleGroup.  WAF rejects any extra actions or wildcard actions in the policy.   The policy must not include a Resource parameter.   For more information, see IAM Policies.
        public let policy: String
        /// The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach the policy.
        public let resourceArn: String

        public init(policy: String, resourceArn: String) {
            self.policy = policy
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.policy, name: "policy", parent: name, max: 395_000)
            try self.validate(self.policy, name: "policy", parent: name, min: 1)
            try self.validate(self.policy, name: "policy", parent: name, pattern: "\\S")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "Policy"
            case resourceArn = "ResourceArn"
        }
    }

    public struct PutPermissionPolicyResponse: AWSDecodableShape {
        public init() {}
    }

    public struct QueryString: AWSEncodableShape & AWSDecodableShape {
        public init() {}
    }

    public final class RateBasedStatement: AWSEncodableShape & AWSDecodableShape {
        /// Setting that indicates how to aggregate the request counts. The options are the following:   IP - Aggregate the request counts on the IP address from the web request origin.   FORWARDED_IP - Aggregate the request counts on the first IP address in an HTTP header. If you use this, configure the ForwardedIPConfig, to specify the header to use.
        public let aggregateKeyType: RateBasedStatementAggregateKeyType
        /// The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.   If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.  This is required if AggregateKeyType is set to FORWARDED_IP.
        public let forwardedIPConfig: ForwardedIPConfig?
        /// The limit on requests per 5-minute period for a single originating IP address. If the statement includes a ScopeDownStatement, this limit is applied only to the requests that match the statement.
        public let limit: Int64
        /// An optional nested statement that narrows the scope of the web requests that are evaluated by the rate-based statement. Requests are only tracked by the rate-based statement if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.
        public let scopeDownStatement: Statement?

        public init(aggregateKeyType: RateBasedStatementAggregateKeyType, forwardedIPConfig: ForwardedIPConfig? = nil, limit: Int64, scopeDownStatement: Statement? = nil) {
            self.aggregateKeyType = aggregateKeyType
            self.forwardedIPConfig = forwardedIPConfig
            self.limit = limit
            self.scopeDownStatement = scopeDownStatement
        }

        public func validate(name: String) throws {
            try self.forwardedIPConfig?.validate(name: "\(name).forwardedIPConfig")
            try self.validate(self.limit, name: "limit", parent: name, max: 2_000_000_000)
            try self.validate(self.limit, name: "limit", parent: name, min: 100)
            try self.scopeDownStatement?.validate(name: "\(name).scopeDownStatement")
        }

        private enum CodingKeys: String, CodingKey {
            case aggregateKeyType = "AggregateKeyType"
            case forwardedIPConfig = "ForwardedIPConfig"
            case limit = "Limit"
            case scopeDownStatement = "ScopeDownStatement"
        }
    }

    public struct RateBasedStatementManagedKeysIPSet: AWSDecodableShape {
        /// The IP addresses that are currently blocked.
        public let addresses: [String]?
        /// The version of the IP addresses, either IPV4 or IPV6.
        public let ipAddressVersion: IPAddressVersion?

        public init(addresses: [String]? = nil, ipAddressVersion: IPAddressVersion? = nil) {
            self.addresses = addresses
            self.ipAddressVersion = ipAddressVersion
        }

        private enum CodingKeys: String, CodingKey {
            case addresses = "Addresses"
            case ipAddressVersion = "IPAddressVersion"
        }
    }

    public struct Regex: AWSEncodableShape & AWSDecodableShape {
        /// The string representing the regular expression.
        public let regexString: String?

        public init(regexString: String? = nil) {
            self.regexString = regexString
        }

        public func validate(name: String) throws {
            try self.validate(self.regexString, name: "regexString", parent: name, max: 512)
            try self.validate(self.regexString, name: "regexString", parent: name, min: 1)
            try self.validate(self.regexString, name: "regexString", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case regexString = "RegexString"
        }
    }

    public struct RegexMatchStatement: AWSEncodableShape & AWSDecodableShape {
        /// The part of the web request that you want WAF to inspect.
        public let fieldToMatch: FieldToMatch
        /// The string representing the regular expression.
        public let regexString: String
        /// Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.  If you specify one or more transformations in a rule statement, WAF performs all transformations on the  content of the request component identified by FieldToMatch, starting from the lowest priority setting, before inspecting the content for a match.
        public let textTransformations: [TextTransformation]

        public init(fieldToMatch: FieldToMatch, regexString: String, textTransformations: [TextTransformation]) {
            self.fieldToMatch = fieldToMatch
            self.regexString = regexString
            self.textTransformations = textTransformations
        }

        public func validate(name: String) throws {
            try self.fieldToMatch.validate(name: "\(name).fieldToMatch")
            try self.validate(self.regexString, name: "regexString", parent: name, max: 512)
            try self.validate(self.regexString, name: "regexString", parent: name, min: 1)
            try self.validate(self.regexString, name: "regexString", parent: name, pattern: ".*")
            try self.textTransformations.forEach {
                try $0.validate(name: "\(name).textTransformations[]")
            }
            try self.validate(self.textTransformations, name: "textTransformations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case fieldToMatch = "FieldToMatch"
            case regexString = "RegexString"
            case textTransformations = "TextTransformations"
        }
    }

    public struct RegexPatternSet: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the entity.
        public let arn: String?
        /// A description of the set that helps with identification.
        public let description: String?
        /// A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String?
        /// The name of the set. You cannot change the name after you create the set.
        public let name: String?
        /// The regular expression patterns in the set.
        public let regularExpressionList: [Regex]?

        public init(arn: String? = nil, description: String? = nil, id: String? = nil, name: String? = nil, regularExpressionList: [Regex]? = nil) {
            self.arn = arn
            self.description = description
            self.id = id
            self.name = name
            self.regularExpressionList = regularExpressionList
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case description = "Description"
            case id = "Id"
            case name = "Name"
            case regularExpressionList = "RegularExpressionList"
        }
    }

    public struct RegexPatternSetReferenceStatement: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the RegexPatternSet that this statement references.
        public let arn: String
        /// The part of the web request that you want WAF to inspect.
        public let fieldToMatch: FieldToMatch
        /// Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.  If you specify one or more transformations in a rule statement, WAF performs all transformations on the  content of the request component identified by FieldToMatch, starting from the lowest priority setting, before inspecting the content for a match.
        public let textTransformations: [TextTransformation]

        public init(arn: String, fieldToMatch: FieldToMatch, textTransformations: [TextTransformation]) {
            self.arn = arn
            self.fieldToMatch = fieldToMatch
            self.textTransformations = textTransformations
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 2048)
            try self.validate(self.arn, name: "arn", parent: name, min: 20)
            try self.validate(self.arn, name: "arn", parent: name, pattern: "\\S")
            try self.fieldToMatch.validate(name: "\(name).fieldToMatch")
            try self.textTransformations.forEach {
                try $0.validate(name: "\(name).textTransformations[]")
            }
            try self.validate(self.textTransformations, name: "textTransformations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case fieldToMatch = "FieldToMatch"
            case textTransformations = "TextTransformations"
        }
    }

    public struct RegexPatternSetSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the entity.
        public let arn: String?
        /// A description of the set that helps with identification.
        public let description: String?
        /// A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String?
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String?
        /// The name of the data type instance. You cannot change the name after you create the instance.
        public let name: String?

        public init(arn: String? = nil, description: String? = nil, id: String? = nil, lockToken: String? = nil, name: String? = nil) {
            self.arn = arn
            self.description = description
            self.id = id
            self.lockToken = lockToken
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case description = "Description"
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
        }
    }

    public struct ReleaseSummary: AWSDecodableShape {
        /// The release version.
        public let releaseVersion: String?
        /// The timestamp of the release.
        public let timestamp: Date?

        public init(releaseVersion: String? = nil, timestamp: Date? = nil) {
            self.releaseVersion = releaseVersion
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case releaseVersion = "ReleaseVersion"
            case timestamp = "Timestamp"
        }
    }

    public struct Rule: AWSEncodableShape & AWSDecodableShape {
        /// The action that WAF should take on a web request when it matches the rule statement. Settings at the web ACL level can override the rule action setting.  This is used only for rules whose statements do not reference a rule group. Rule statements that reference a rule group include RuleGroupReferenceStatement and ManagedRuleGroupStatement.  You must specify either this Action setting or the rule OverrideAction setting, but not both:   If the rule statement does not reference a rule group, use this rule action setting and not the rule override action setting.    If the rule statement references a rule group, use the override action setting and not this action setting.
        public let action: RuleAction?
        /// Specifies how WAF should handle CAPTCHA evaluations. If you don't specify this, WAF uses the CAPTCHA configuration that's defined for the web ACL.
        public let captchaConfig: CaptchaConfig?
        /// Specifies how WAF should handle Challenge evaluations. If you don't specify this, WAF uses the challenge configuration that's defined for the web ACL.
        public let challengeConfig: ChallengeConfig?
        /// The name of the rule. You can't change the name of a Rule after you create it.
        public let name: String
        /// The action to use in the place of the action that results from the rule group evaluation. Set the override action to none to leave the result of the rule group alone. Set it to count to override the result to count only.  You can only use this for rule statements that reference a rule group, like RuleGroupReferenceStatement and ManagedRuleGroupStatement.   This option is usually set to none. It does not affect how the rules in the rule group are evaluated. If you want the rules in the rule group to only count   matches, do not use this and instead use the rule action override option, with Count action, in your rule group reference statement settings.
        public let overrideAction: OverrideAction?
        /// If you define more than one Rule in a WebACL, WAF evaluates each request against the Rules in order based on the value of Priority. WAF processes rules with lower priority first. The priorities don't need to be consecutive, but they must all be different.
        public let priority: Int
        /// Labels to apply to web requests that match the rule match statement. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.  Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement. For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:   Separate each component of the label with a colon.    Each namespace or name can have up to 128 characters.   You can specify up to 5 namespaces in a label.   Don't use the following reserved words in your label specification: aws, waf, managed, rulegroup, webacl, regexpatternset, or ipset.   For example, myLabelName or nameSpace1:nameSpace2:myLabelName.
        public let ruleLabels: [Label]?
        /// The WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement.
        public let statement: Statement
        /// Defines and enables Amazon CloudWatch metrics and web request sample collection.
        public let visibilityConfig: VisibilityConfig

        public init(action: RuleAction? = nil, captchaConfig: CaptchaConfig? = nil, challengeConfig: ChallengeConfig? = nil, name: String, overrideAction: OverrideAction? = nil, priority: Int, ruleLabels: [Label]? = nil, statement: Statement, visibilityConfig: VisibilityConfig) {
            self.action = action
            self.captchaConfig = captchaConfig
            self.challengeConfig = challengeConfig
            self.name = name
            self.overrideAction = overrideAction
            self.priority = priority
            self.ruleLabels = ruleLabels
            self.statement = statement
            self.visibilityConfig = visibilityConfig
        }

        public func validate(name: String) throws {
            try self.action?.validate(name: "\(name).action")
            try self.captchaConfig?.validate(name: "\(name).captchaConfig")
            try self.challengeConfig?.validate(name: "\(name).challengeConfig")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.overrideAction?.validate(name: "\(name).overrideAction")
            try self.validate(self.priority, name: "priority", parent: name, min: 0)
            try self.ruleLabels?.forEach {
                try $0.validate(name: "\(name).ruleLabels[]")
            }
            try self.statement.validate(name: "\(name).statement")
            try self.visibilityConfig.validate(name: "\(name).visibilityConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case action = "Action"
            case captchaConfig = "CaptchaConfig"
            case challengeConfig = "ChallengeConfig"
            case name = "Name"
            case overrideAction = "OverrideAction"
            case priority = "Priority"
            case ruleLabels = "RuleLabels"
            case statement = "Statement"
            case visibilityConfig = "VisibilityConfig"
        }
    }

    public struct RuleAction: AWSEncodableShape & AWSDecodableShape {
        /// Instructs WAF to allow the web request.
        public let allow: AllowAction?
        /// Instructs WAF to block the web request.
        public let block: BlockAction?
        /// Instructs WAF to run a CAPTCHA check against the web request.
        public let captcha: CaptchaAction?
        /// Instructs WAF to run a Challenge check against the web request.
        public let challenge: ChallengeAction?
        /// Instructs WAF to count the web request and then continue evaluating the request using the remaining rules in the web ACL.
        public let count: CountAction?

        public init(allow: AllowAction? = nil, block: BlockAction? = nil, captcha: CaptchaAction? = nil, challenge: ChallengeAction? = nil, count: CountAction? = nil) {
            self.allow = allow
            self.block = block
            self.captcha = captcha
            self.challenge = challenge
            self.count = count
        }

        public func validate(name: String) throws {
            try self.allow?.validate(name: "\(name).allow")
            try self.block?.validate(name: "\(name).block")
            try self.captcha?.validate(name: "\(name).captcha")
            try self.challenge?.validate(name: "\(name).challenge")
            try self.count?.validate(name: "\(name).count")
        }

        private enum CodingKeys: String, CodingKey {
            case allow = "Allow"
            case block = "Block"
            case captcha = "Captcha"
            case challenge = "Challenge"
            case count = "Count"
        }
    }

    public struct RuleActionOverride: AWSEncodableShape & AWSDecodableShape {
        /// The override action to use, in place of the configured action of the rule in the rule group.
        public let actionToUse: RuleAction
        /// The name of the rule to override.
        public let name: String

        public init(actionToUse: RuleAction, name: String) {
            self.actionToUse = actionToUse
            self.name = name
        }

        public func validate(name: String) throws {
            try self.actionToUse.validate(name: "\(name).actionToUse")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case actionToUse = "ActionToUse"
            case name = "Name"
        }
    }

    public struct RuleGroup: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the entity.
        public let arn: String
        /// The labels that one or more rules in this rule group add to matching web requests. These labels are defined in the RuleLabels for a Rule.
        public let availableLabels: [LabelSummary]?
        /// The web ACL capacity units (WCUs) required for this rule group. When you create your own rule group, you define this, and you cannot change it after creation.  When you add or modify the rules in a rule group, WAF enforces this limit. You can check the capacity  for a set of rules using CheckCapacity. WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule.  Simple rules that cost little to run use fewer WCUs than more complex rules
        /// 				that use more processing power.
        /// 				Rule group capacity is fixed at creation, which helps users plan their   web ACL WCU usage when they use a rule group.  The WCU limit for web ACLs is 1,500.
        public let capacity: Int64
        /// The labels that one or more rules in this rule group match against in label match statements. These labels are defined in a LabelMatchStatement specification, in the Statement definition of a rule.
        public let consumedLabels: [LabelSummary]?
        /// A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.  For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the  WAF Developer Guide.  For information about the limits on count and size for custom request and response settings, see WAF quotas in the  WAF Developer Guide.
        public let customResponseBodies: [String: CustomResponseBody]?
        /// A description of the rule group that helps with identification.
        public let description: String?
        /// A unique identifier for the rule group. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// The label namespace prefix for this rule group. All labels added by rules in this rule group have this prefix.    The syntax for the label namespace prefix for your rule groups is the following:   awswaf::rulegroup::    When a rule with a label matches a web request, WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon:   :
        public let labelNamespace: String?
        /// The name of the rule group. You cannot change the name of a rule group after you create it.
        public let name: String
        /// The Rule statements used to identify the web requests that you  want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching   web requests, and parameters that govern how WAF handles them.
        public let rules: [Rule]?
        /// Defines and enables Amazon CloudWatch metrics and web request sample collection.
        public let visibilityConfig: VisibilityConfig

        public init(arn: String, availableLabels: [LabelSummary]? = nil, capacity: Int64, consumedLabels: [LabelSummary]? = nil, customResponseBodies: [String: CustomResponseBody]? = nil, description: String? = nil, id: String, labelNamespace: String? = nil, name: String, rules: [Rule]? = nil, visibilityConfig: VisibilityConfig) {
            self.arn = arn
            self.availableLabels = availableLabels
            self.capacity = capacity
            self.consumedLabels = consumedLabels
            self.customResponseBodies = customResponseBodies
            self.description = description
            self.id = id
            self.labelNamespace = labelNamespace
            self.name = name
            self.rules = rules
            self.visibilityConfig = visibilityConfig
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case availableLabels = "AvailableLabels"
            case capacity = "Capacity"
            case consumedLabels = "ConsumedLabels"
            case customResponseBodies = "CustomResponseBodies"
            case description = "Description"
            case id = "Id"
            case labelNamespace = "LabelNamespace"
            case name = "Name"
            case rules = "Rules"
            case visibilityConfig = "VisibilityConfig"
        }
    }

    public struct RuleGroupReferenceStatement: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the entity.
        public let arn: String
        /// Rules in the referenced rule group whose actions are set to Count.   Instead of this option, use RuleActionOverrides. It accepts any valid action setting, including Count.
        public let excludedRules: [ExcludedRule]?
        /// Action settings to use in the place of the rule actions that are configured inside the rule group. You specify one override for each rule whose action you want to change.  You can use overrides for testing, for example you can override all of rule actions to Count and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.
        public let ruleActionOverrides: [RuleActionOverride]?

        public init(arn: String, excludedRules: [ExcludedRule]? = nil, ruleActionOverrides: [RuleActionOverride]? = nil) {
            self.arn = arn
            self.excludedRules = excludedRules
            self.ruleActionOverrides = ruleActionOverrides
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 2048)
            try self.validate(self.arn, name: "arn", parent: name, min: 20)
            try self.validate(self.arn, name: "arn", parent: name, pattern: "\\S")
            try self.excludedRules?.forEach {
                try $0.validate(name: "\(name).excludedRules[]")
            }
            try self.validate(self.excludedRules, name: "excludedRules", parent: name, max: 100)
            try self.ruleActionOverrides?.forEach {
                try $0.validate(name: "\(name).ruleActionOverrides[]")
            }
            try self.validate(self.ruleActionOverrides, name: "ruleActionOverrides", parent: name, max: 100)
            try self.validate(self.ruleActionOverrides, name: "ruleActionOverrides", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case excludedRules = "ExcludedRules"
            case ruleActionOverrides = "RuleActionOverrides"
        }
    }

    public struct RuleGroupSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the entity.
        public let arn: String?
        /// A description of the rule group that helps with identification.
        public let description: String?
        /// A unique identifier for the rule group. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String?
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String?
        /// The name of the data type instance. You cannot change the name after you create the instance.
        public let name: String?

        public init(arn: String? = nil, description: String? = nil, id: String? = nil, lockToken: String? = nil, name: String? = nil) {
            self.arn = arn
            self.description = description
            self.id = id
            self.lockToken = lockToken
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case description = "Description"
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
        }
    }

    public struct RuleSummary: AWSDecodableShape {
        /// The action that WAF should take on a web request when it matches a rule's statement. Settings at the web ACL level can override the rule action setting.
        public let action: RuleAction?
        /// The name of the rule.
        public let name: String?

        public init(action: RuleAction? = nil, name: String? = nil) {
            self.action = action
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case action = "Action"
            case name = "Name"
        }
    }

    public struct SampledHTTPRequest: AWSDecodableShape {
        /// The action that WAF applied to the request.
        public let action: String?
        /// The CAPTCHA response for the request.
        public let captchaResponse: CaptchaResponse?
        /// The Challenge response for the request.
        public let challengeResponse: ChallengeResponse?
        /// Labels applied to the web request by matching rules. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.  For example, awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA or awswaf:managed:aws:managed-rule-set:header:encoding:utf8.
        public let labels: [Label]?
        /// Used only for rule group rules that have a rule action override in place in the web ACL. This is the action that the rule group rule is configured for, and not the action that was applied to the request. The action that WAF applied is the Action value.
        public let overriddenAction: String?
        /// A complex type that contains detailed information about the request.
        public let request: HTTPRequest
        /// Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.
        public let requestHeadersInserted: [HTTPHeader]?
        /// The response code that was sent for the request.
        public let responseCodeSent: Int?
        /// The name of the Rule that the request matched. For managed rule groups, the format for this name is ##. For your own rule groups, the format for this name is #. If the rule is not in a rule group, this field is absent.
        public let ruleNameWithinRuleGroup: String?
        /// The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).
        public let timestamp: Date?
        /// A value that indicates how one result in the response relates proportionally to other results in the response. For example, a result that has a weight of 2 represents roughly twice as many web requests as a result that has a weight of 1.
        public let weight: Int64

        public init(action: String? = nil, captchaResponse: CaptchaResponse? = nil, challengeResponse: ChallengeResponse? = nil, labels: [Label]? = nil, overriddenAction: String? = nil, request: HTTPRequest, requestHeadersInserted: [HTTPHeader]? = nil, responseCodeSent: Int? = nil, ruleNameWithinRuleGroup: String? = nil, timestamp: Date? = nil, weight: Int64) {
            self.action = action
            self.captchaResponse = captchaResponse
            self.challengeResponse = challengeResponse
            self.labels = labels
            self.overriddenAction = overriddenAction
            self.request = request
            self.requestHeadersInserted = requestHeadersInserted
            self.responseCodeSent = responseCodeSent
            self.ruleNameWithinRuleGroup = ruleNameWithinRuleGroup
            self.timestamp = timestamp
            self.weight = weight
        }

        private enum CodingKeys: String, CodingKey {
            case action = "Action"
            case captchaResponse = "CaptchaResponse"
            case challengeResponse = "ChallengeResponse"
            case labels = "Labels"
            case overriddenAction = "OverriddenAction"
            case request = "Request"
            case requestHeadersInserted = "RequestHeadersInserted"
            case responseCodeSent = "ResponseCodeSent"
            case ruleNameWithinRuleGroup = "RuleNameWithinRuleGroup"
            case timestamp = "Timestamp"
            case weight = "Weight"
        }
    }

    public struct SingleHeader: AWSEncodableShape & AWSDecodableShape {
        /// The name of the query header to inspect.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct SingleQueryArgument: AWSEncodableShape & AWSDecodableShape {
        /// The name of the query argument to inspect.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct SizeConstraintStatement: AWSEncodableShape & AWSDecodableShape {
        /// The operator to use to compare the request part to the size setting.
        public let comparisonOperator: ComparisonOperator
        /// The part of the web request that you want WAF to inspect.
        public let fieldToMatch: FieldToMatch
        /// The size, in byte, to compare to the request part, after any transformations.
        public let size: Int64
        /// Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.  If you specify one or more transformations in a rule statement, WAF performs all transformations on the  content of the request component identified by FieldToMatch, starting from the lowest priority setting, before inspecting the content for a match.
        public let textTransformations: [TextTransformation]

        public init(comparisonOperator: ComparisonOperator, fieldToMatch: FieldToMatch, size: Int64, textTransformations: [TextTransformation]) {
            self.comparisonOperator = comparisonOperator
            self.fieldToMatch = fieldToMatch
            self.size = size
            self.textTransformations = textTransformations
        }

        public func validate(name: String) throws {
            try self.fieldToMatch.validate(name: "\(name).fieldToMatch")
            try self.validate(self.size, name: "size", parent: name, max: 21_474_836_480)
            try self.validate(self.size, name: "size", parent: name, min: 0)
            try self.textTransformations.forEach {
                try $0.validate(name: "\(name).textTransformations[]")
            }
            try self.validate(self.textTransformations, name: "textTransformations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case comparisonOperator = "ComparisonOperator"
            case fieldToMatch = "FieldToMatch"
            case size = "Size"
            case textTransformations = "TextTransformations"
        }
    }

    public struct SqliMatchStatement: AWSEncodableShape & AWSDecodableShape {
        /// The part of the web request that you want WAF to inspect.
        public let fieldToMatch: FieldToMatch
        /// The sensitivity that you want WAF to use to inspect for SQL injection attacks.   HIGH detects more attacks, but might generate more false positives,  especially if your web requests frequently contain unusual strings.  For information about identifying and mitigating false positives, see  Testing and tuning in the                                                                              WAF Developer Guide.  LOW is generally a better choice for resources that already have other  protections against SQL injection attacks or that have a low tolerance for false positives.  Default: LOW
        public let sensitivityLevel: SensitivityLevel?
        /// Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.  If you specify one or more transformations in a rule statement, WAF performs all transformations on the  content of the request component identified by FieldToMatch, starting from the lowest priority setting, before inspecting the content for a match.
        public let textTransformations: [TextTransformation]

        public init(fieldToMatch: FieldToMatch, sensitivityLevel: SensitivityLevel? = nil, textTransformations: [TextTransformation]) {
            self.fieldToMatch = fieldToMatch
            self.sensitivityLevel = sensitivityLevel
            self.textTransformations = textTransformations
        }

        public func validate(name: String) throws {
            try self.fieldToMatch.validate(name: "\(name).fieldToMatch")
            try self.textTransformations.forEach {
                try $0.validate(name: "\(name).textTransformations[]")
            }
            try self.validate(self.textTransformations, name: "textTransformations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case fieldToMatch = "FieldToMatch"
            case sensitivityLevel = "SensitivityLevel"
            case textTransformations = "TextTransformations"
        }
    }

    public final class Statement: AWSEncodableShape & AWSDecodableShape {
        /// A logical rule statement used to combine other rule statements with AND logic. You provide more than one Statement within the AndStatement.
        public let andStatement: AndStatement?
        /// A rule statement that defines a string match search for WAF to apply to web requests. The byte match statement provides the bytes to search for, the location in requests that you want WAF to search, and other settings. The bytes to search for are typically a string that corresponds with ASCII characters. In the WAF console and the developer guide, this is called a string match statement.
        public let byteMatchStatement: ByteMatchStatement?
        /// A rule statement that labels web requests by country and region and that matches against web requests based on country code. A geo match rule labels every request that it inspects regardless of whether it finds a match.   To manage requests only by country, you can use this statement by itself and specify the countries that you want to match against in the CountryCodes array.    Otherwise, configure your geo match rule with Count action so that it only labels requests. Then, add one or more label match rules to run after the geo match rule and configure them to match against the geographic labels and handle the requests as needed.    WAF labels requests using the alpha-2 country and region codes from the International Organization for Standardization (ISO) 3166 standard. WAF determines the codes using either the IP address in the web request origin or, if you specify it, the address in the geo match ForwardedIPConfig.  If you use the web request origin, the label formats are awswaf:clientip:geo:region:- and awswaf:clientip:geo:country:. If you use a forwarded IP address, the label formats are awswaf:forwardedip:geo:region:- and awswaf:forwardedip:geo:country:. For additional details, see Geographic match rule statement in the WAF Developer Guide.
        public let geoMatchStatement: GeoMatchStatement?
        /// A rule statement used to detect web requests coming from particular IP addresses or address ranges. To use this, create an IPSet that specifies the addresses you want to detect, then use the ARN of that set in this statement. To create an IP set, see CreateIPSet. Each IP set rule statement references an IP set. You create and maintain the set independent of your rules. This allows you to use the single set in multiple rules. When you update the referenced set, WAF automatically updates all rules that reference it.
        public let ipSetReferenceStatement: IPSetReferenceStatement?
        /// A rule statement to match against labels that have been added to the web request by rules that have already run in the web ACL.  The label match statement provides the label or namespace string to search for. The label string can represent a part or all of the fully qualified label name that had been added to the web request. Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label.  If you do not provide the fully qualified name in your label match string, WAF performs the search for labels that were added in the same context as the label match statement.
        public let labelMatchStatement: LabelMatchStatement?
        /// A rule statement used to run the rules that are defined in a managed rule group. To use this, provide the vendor name and the name of the rule group in this statement. You can retrieve the required names by calling ListAvailableManagedRuleGroups. You cannot nest a ManagedRuleGroupStatement, for example for use inside a NotStatement or OrStatement. It can only be referenced as a top-level statement within a rule.  You are charged additional fees when you use the WAF Bot Control managed rule group AWSManagedRulesBotControlRuleSet or the WAF Fraud Control account takeover prevention (ATP) managed rule group AWSManagedRulesATPRuleSet. For more information, see WAF Pricing.
        public let managedRuleGroupStatement: ManagedRuleGroupStatement?
        /// A logical rule statement used to negate the results of another rule statement. You provide one Statement within the NotStatement.
        public let notStatement: NotStatement?
        /// A logical rule statement used to combine other rule statements with OR logic. You provide more than one Statement within the OrStatement.
        public let orStatement: OrStatement?
        /// A rate-based rule tracks the rate of requests for each originating IP address, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any 5-minute time span. You can use this to put a temporary block on requests from an IP address that is sending excessive requests.  WAF tracks and manages web requests separately for each instance of a rate-based rule that you use. For example, if you provide the same rate-based rule settings in two web ACLs, each of the two rule statements represents a separate instance of the rate-based rule and gets its own tracking and management by WAF. If you define a rate-based rule inside a rule group, and then use that rule group in multiple places, each use creates a separate instance of the rate-based rule that gets its own tracking and management by WAF.  When the rule action triggers, WAF blocks additional requests from the IP address until the request rate falls below the limit. You can optionally nest another statement inside the rate-based statement, to narrow the scope of the rule so that it only counts requests that match the nested statement. For example, based on recent requests that you have seen from an attacker, you might create a rate-based rule with a nested AND rule statement that contains the following nested statements:   An IP match statement with an IP set that specified the address 192.0.2.44.   A string match statement that searches in the User-Agent header for the string BadBot.   In this rate-based rule, you also define a rate limit. For this example, the rate limit is 1,000. Requests that meet the criteria of both of the nested statements are counted. If the count exceeds 1,000 requests per five minutes, the rule action triggers. Requests that do not meet the criteria of both of the nested statements are not counted towards the rate limit and are not affected by this rule. You cannot nest a RateBasedStatement inside another statement, for example inside a NotStatement or OrStatement. You can define a RateBasedStatement inside a web ACL and inside a rule group.
        public let rateBasedStatement: RateBasedStatement?
        /// A rule statement used to search web request components for a match against a single regular expression.
        public let regexMatchStatement: RegexMatchStatement?
        /// A rule statement used to search web request components for matches with regular expressions. To use this, create a RegexPatternSet that specifies the expressions that you want to detect, then use the ARN of that set in this statement. A web request matches the pattern set rule statement if the request component matches any of the patterns in the set. To create a regex pattern set, see CreateRegexPatternSet. Each regex pattern set rule statement references a regex pattern set. You create and maintain the set independent of your rules. This allows you to use the single set in multiple rules. When you update the referenced set, WAF automatically updates all rules that reference it.
        public let regexPatternSetReferenceStatement: RegexPatternSetReferenceStatement?
        /// A rule statement used to run the rules that are defined in a RuleGroup. To use this, create a rule group with your rules, then provide the ARN of the rule group in this statement. You cannot nest a RuleGroupReferenceStatement, for example for use inside a NotStatement or OrStatement. You  can only use a rule group reference statement at the top level inside a web ACL.
        public let ruleGroupReferenceStatement: RuleGroupReferenceStatement?
        /// A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than ( If you configure WAF to inspect the request body, WAF inspects only the first 8192 bytes (8 KB). If the request body for your web requests never exceeds 8192 bytes, you could use a size constraint statement to block requests that have a request body greater than 8192 bytes. If you choose URI for the value of Part of the request to filter on, the slash (/) in the URI counts as one character. For example, the URI /logo.jpg is nine characters long.
        public let sizeConstraintStatement: SizeConstraintStatement?
        /// A rule statement that inspects for malicious SQL code. Attackers insert malicious SQL code into web requests to do things like modify your database or extract data from it.
        public let sqliMatchStatement: SqliMatchStatement?
        /// A rule statement that inspects for cross-site scripting (XSS) attacks. In XSS attacks, the attacker
        /// uses vulnerabilities in a benign website as a vehicle to inject malicious client-site scripts into other legitimate web browsers.
        public let xssMatchStatement: XssMatchStatement?

        public init(andStatement: AndStatement? = nil, byteMatchStatement: ByteMatchStatement? = nil, geoMatchStatement: GeoMatchStatement? = nil, ipSetReferenceStatement: IPSetReferenceStatement? = nil, labelMatchStatement: LabelMatchStatement? = nil, managedRuleGroupStatement: ManagedRuleGroupStatement? = nil, notStatement: NotStatement? = nil, orStatement: OrStatement? = nil, rateBasedStatement: RateBasedStatement? = nil, regexMatchStatement: RegexMatchStatement? = nil, regexPatternSetReferenceStatement: RegexPatternSetReferenceStatement? = nil, ruleGroupReferenceStatement: RuleGroupReferenceStatement? = nil, sizeConstraintStatement: SizeConstraintStatement? = nil, sqliMatchStatement: SqliMatchStatement? = nil, xssMatchStatement: XssMatchStatement? = nil) {
            self.andStatement = andStatement
            self.byteMatchStatement = byteMatchStatement
            self.geoMatchStatement = geoMatchStatement
            self.ipSetReferenceStatement = ipSetReferenceStatement
            self.labelMatchStatement = labelMatchStatement
            self.managedRuleGroupStatement = managedRuleGroupStatement
            self.notStatement = notStatement
            self.orStatement = orStatement
            self.rateBasedStatement = rateBasedStatement
            self.regexMatchStatement = regexMatchStatement
            self.regexPatternSetReferenceStatement = regexPatternSetReferenceStatement
            self.ruleGroupReferenceStatement = ruleGroupReferenceStatement
            self.sizeConstraintStatement = sizeConstraintStatement
            self.sqliMatchStatement = sqliMatchStatement
            self.xssMatchStatement = xssMatchStatement
        }

        public func validate(name: String) throws {
            try self.andStatement?.validate(name: "\(name).andStatement")
            try self.byteMatchStatement?.validate(name: "\(name).byteMatchStatement")
            try self.geoMatchStatement?.validate(name: "\(name).geoMatchStatement")
            try self.ipSetReferenceStatement?.validate(name: "\(name).ipSetReferenceStatement")
            try self.labelMatchStatement?.validate(name: "\(name).labelMatchStatement")
            try self.managedRuleGroupStatement?.validate(name: "\(name).managedRuleGroupStatement")
            try self.notStatement?.validate(name: "\(name).notStatement")
            try self.orStatement?.validate(name: "\(name).orStatement")
            try self.rateBasedStatement?.validate(name: "\(name).rateBasedStatement")
            try self.regexMatchStatement?.validate(name: "\(name).regexMatchStatement")
            try self.regexPatternSetReferenceStatement?.validate(name: "\(name).regexPatternSetReferenceStatement")
            try self.ruleGroupReferenceStatement?.validate(name: "\(name).ruleGroupReferenceStatement")
            try self.sizeConstraintStatement?.validate(name: "\(name).sizeConstraintStatement")
            try self.sqliMatchStatement?.validate(name: "\(name).sqliMatchStatement")
            try self.xssMatchStatement?.validate(name: "\(name).xssMatchStatement")
        }

        private enum CodingKeys: String, CodingKey {
            case andStatement = "AndStatement"
            case byteMatchStatement = "ByteMatchStatement"
            case geoMatchStatement = "GeoMatchStatement"
            case ipSetReferenceStatement = "IPSetReferenceStatement"
            case labelMatchStatement = "LabelMatchStatement"
            case managedRuleGroupStatement = "ManagedRuleGroupStatement"
            case notStatement = "NotStatement"
            case orStatement = "OrStatement"
            case rateBasedStatement = "RateBasedStatement"
            case regexMatchStatement = "RegexMatchStatement"
            case regexPatternSetReferenceStatement = "RegexPatternSetReferenceStatement"
            case ruleGroupReferenceStatement = "RuleGroupReferenceStatement"
            case sizeConstraintStatement = "SizeConstraintStatement"
            case sqliMatchStatement = "SqliMatchStatement"
            case xssMatchStatement = "XssMatchStatement"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.
        public let key: String
        /// Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.
        public let value: String

        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagInfoForResource: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceARN: String?
        /// The array of Tag objects defined for the resource.
        public let tagList: [Tag]?

        public init(resourceARN: String? = nil, tagList: [Tag]? = nil) {
            self.resourceARN = resourceARN
            self.tagList = tagList
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tagList = "TagList"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceARN: String
        /// An array of key:value pairs to associate with the resource.
        public let tags: [Tag]

        public init(resourceARN: String, tags: [Tag]) {
            self.resourceARN = resourceARN
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 20)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "\\S")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TextTransformation: AWSEncodableShape & AWSDecodableShape {
        /// Sets the relative processing order for multiple transformations that are defined for a rule statement. WAF processes all transformations, from lowest priority to highest, before inspecting the transformed content. The priorities don't need to be consecutive, but they must all be different.
        public let priority: Int
        /// You can specify the following transformation types:  BASE64_DECODE - Decode a Base64-encoded string.  BASE64_DECODE_EXT - Decode a Base64-encoded string, but use a forgiving implementation that ignores characters that aren't valid.  CMD_LINE - Command-line transformations. These are helpful in reducing effectiveness of attackers who inject an operating system command-line  command and use unusual formatting to disguise some or all of the command.    Delete the following characters: \ " ' ^    Delete spaces before the following characters: / (    Replace the following characters with a space: , ;    Replace multiple spaces with one space   Convert uppercase letters (A-Z) to lowercase (a-z)    COMPRESS_WHITE_SPACE - Replace these characters with a space character (decimal 32):     \f, formfeed, decimal 12    \t, tab, decimal 9    \n, newline, decimal 10    \r, carriage return, decimal 13    \v, vertical tab, decimal 11   Non-breaking space, decimal 160    COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.  CSS_DECODE - Decode characters that were encoded using CSS 2.x escape rules syndata.html#characters. This function uses up to two bytes in the decoding process, so it can help to uncover ASCII characters that were encoded using CSS encoding that wouldn’t typically be encoded. It's also useful in countering evasion, which is a combination of a backslash and non-hexadecimal characters. For example, ja\vascript for javascript.   ESCAPE_SEQ_DECODE - Decode the following ANSI C escape sequences: \a, \b, \f, \n, \r, \t, \v, \\, \?, \', \", \xHH (hexadecimal), \0OOO (octal). Encodings that aren't valid remain in the output.   HEX_DECODE - Decode a string of hexadecimal characters into a binary.  HTML_ENTITY_DECODE - Replace HTML-encoded characters with unencoded characters. HTML_ENTITY_DECODE performs these operations:    Replaces (ampersand)quot; with "    Replaces (ampersand)nbsp; with a non-breaking space, decimal 160   Replaces (ampersand)lt; with a "less than" symbol   Replaces (ampersand)gt; with >    Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, with the corresponding characters   Replaces characters that are represented in decimal format, (ampersand)#nnnn;, with the corresponding characters    JS_DECODE - Decode JavaScript escape sequences. If a \ u HHHH code is in the full-width ASCII code range of FF01-FF5E, then the higher byte is used to detect and adjust the lower byte. If not, only the lower byte is used and the higher byte is zeroed, causing a possible loss of information.   LOWERCASE - Convert uppercase letters (A-Z) to lowercase (a-z).   MD5 - Calculate an MD5 hash from the data in the input. The computed hash is in a raw binary form.   NONE - Specify NONE if you don't want any text transformations.   NORMALIZE_PATH - Remove multiple slashes, directory self-references, and directory back-references that are not at the beginning of the input from an input string.   NORMALIZE_PATH_WIN - This is the same as NORMALIZE_PATH, but first converts backslash characters to forward slashes.   REMOVE_NULLS - Remove all NULL bytes from the input.   REPLACE_COMMENTS - Replace each occurrence of a C-style comment (/* ... */) with a single space. Multiple consecutive occurrences are not compressed. Unterminated comments are also replaced with a space (ASCII 0x20). However, a standalone termination of a comment (*/) is not acted upon.   REPLACE_NULLS - Replace NULL bytes in the input with space characters (ASCII 0x20).   SQL_HEX_DECODE - Decode SQL hex data. Example (0x414243) will be decoded to (ABC).  URL_DECODE - Decode a URL-encoded value.   URL_DECODE_UNI - Like URL_DECODE, but with support for Microsoft-specific %u encoding. If the code is in the full-width ASCII code range of FF01-FF5E, the higher byte is used to detect and adjust the lower byte. Otherwise, only the lower byte is used and the higher byte is zeroed.   UTF8_TO_UNICODE - Convert all UTF-8 character sequences to Unicode. This helps input normalization, and minimizing false-positives and false-negatives for non-English languages.
        public let type: TextTransformationType

        public init(priority: Int, type: TextTransformationType) {
            self.priority = priority
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.priority, name: "priority", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case priority = "Priority"
            case type = "Type"
        }
    }

    public struct TimeWindow: AWSEncodableShape & AWSDecodableShape {
        /// The end of the time range from which you want GetSampledRequests to return a sample of the requests that your Amazon Web Services resource received. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z". You can specify any time range in the previous three hours.
        public let endTime: Date
        /// The beginning of the time range from which you want GetSampledRequests to return a sample of the requests that your Amazon Web Services resource received. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z". You can specify any time range in the previous three hours.
        public let startTime: Date

        public init(endTime: Date, startTime: Date) {
            self.endTime = endTime
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "EndTime"
            case startTime = "StartTime"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceARN: String
        /// An array of keys identifying the tags to disassociate from the resource.
        public let tagKeys: [String]

        public init(resourceARN: String, tagKeys: [String]) {
            self.resourceARN = resourceARN
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 20)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "\\S")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateIPSetRequest: AWSEncodableShape {
        /// Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses. All addresses must be specified using Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for /0.  Example address strings:    To configure WAF to allow, block, or count requests that originated from the IP address 192.0.2.44, specify 192.0.2.44/32.   To configure WAF to allow, block, or count requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify  192.0.2.0/24.   To configure WAF to allow, block, or count requests that originated from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128.   To configure WAF to allow, block, or count requests that originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify 1111:0000:0000:0000:0000:0000:0000:0000/64.   For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing. Example JSON Addresses specifications:    Empty array: "Addresses": []    Array with one address: "Addresses": ["192.0.2.44/32"]    Array with three addresses: "Addresses": ["192.0.2.44/32", "192.0.2.0/24", "192.0.0.0/16"]    INVALID specification: "Addresses": [""] INVALID
        public let addresses: [String]
        /// A description of the IP set that helps with identification.
        public let description: String?
        /// A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String
        /// The name of the IP set. You cannot change the name of an IPSet after you create it.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(addresses: [String], description: String? = nil, id: String, lockToken: String, name: String, scope: Scope) {
            self.addresses = addresses
            self.description = description
            self.id = id
            self.lockToken = lockToken
            self.name = name
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.addresses.forEach {
                try validate($0, name: "addresses[]", parent: name, max: 50)
                try validate($0, name: "addresses[]", parent: name, min: 1)
                try validate($0, name: "addresses[]", parent: name, pattern: "\\S")
            }
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\w+=:#@/\\-,\\.][\\w+=:#@/\\-,\\.\\s]+[\\w+=:#@/\\-,\\.]$")
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.lockToken, name: "lockToken", parent: name, max: 36)
            try self.validate(self.lockToken, name: "lockToken", parent: name, min: 1)
            try self.validate(self.lockToken, name: "lockToken", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case addresses = "Addresses"
            case description = "Description"
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
            case scope = "Scope"
        }
    }

    public struct UpdateIPSetResponse: AWSDecodableShape {
        /// A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.
        public let nextLockToken: String?

        public init(nextLockToken: String? = nil) {
            self.nextLockToken = nextLockToken
        }

        private enum CodingKeys: String, CodingKey {
            case nextLockToken = "NextLockToken"
        }
    }

    public struct UpdateManagedRuleSetVersionExpiryDateRequest: AWSEncodableShape {
        /// The time that you want the version to expire. Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z".
        public let expiryTimestamp: Date
        /// A unique identifier for the managed rule set. The ID is returned in the responses to commands like list. You provide it to operations like get and update.
        public let id: String
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String
        /// The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set. This name is assigned to the corresponding managed rule group, which your customers can access and use.
        public let name: String
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// The version that you want to remove from your list of offerings for the named managed rule group.
        public let versionToExpire: String

        public init(expiryTimestamp: Date, id: String, lockToken: String, name: String, scope: Scope, versionToExpire: String) {
            self.expiryTimestamp = expiryTimestamp
            self.id = id
            self.lockToken = lockToken
            self.name = name
            self.scope = scope
            self.versionToExpire = versionToExpire
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.lockToken, name: "lockToken", parent: name, max: 36)
            try self.validate(self.lockToken, name: "lockToken", parent: name, min: 1)
            try self.validate(self.lockToken, name: "lockToken", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.validate(self.versionToExpire, name: "versionToExpire", parent: name, max: 64)
            try self.validate(self.versionToExpire, name: "versionToExpire", parent: name, min: 1)
            try self.validate(self.versionToExpire, name: "versionToExpire", parent: name, pattern: "^[\\w#:\\.\\-/]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case expiryTimestamp = "ExpiryTimestamp"
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
            case scope = "Scope"
            case versionToExpire = "VersionToExpire"
        }
    }

    public struct UpdateManagedRuleSetVersionExpiryDateResponse: AWSDecodableShape {
        /// The version that is set to expire.
        public let expiringVersion: String?
        /// The time that the version will expire.  Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z".
        public let expiryTimestamp: Date?
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let nextLockToken: String?

        public init(expiringVersion: String? = nil, expiryTimestamp: Date? = nil, nextLockToken: String? = nil) {
            self.expiringVersion = expiringVersion
            self.expiryTimestamp = expiryTimestamp
            self.nextLockToken = nextLockToken
        }

        private enum CodingKeys: String, CodingKey {
            case expiringVersion = "ExpiringVersion"
            case expiryTimestamp = "ExpiryTimestamp"
            case nextLockToken = "NextLockToken"
        }
    }

    public struct UpdateRegexPatternSetRequest: AWSEncodableShape {
        /// A description of the set that helps with identification.
        public let description: String?
        /// A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String
        /// The name of the set. You cannot change the name after you create the set.
        public let name: String
        public let regularExpressionList: [Regex]
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope

        public init(description: String? = nil, id: String, lockToken: String, name: String, regularExpressionList: [Regex], scope: Scope) {
            self.description = description
            self.id = id
            self.lockToken = lockToken
            self.name = name
            self.regularExpressionList = regularExpressionList
            self.scope = scope
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\w+=:#@/\\-,\\.][\\w+=:#@/\\-,\\.\\s]+[\\w+=:#@/\\-,\\.]$")
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.lockToken, name: "lockToken", parent: name, max: 36)
            try self.validate(self.lockToken, name: "lockToken", parent: name, min: 1)
            try self.validate(self.lockToken, name: "lockToken", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.regularExpressionList.forEach {
                try $0.validate(name: "\(name).regularExpressionList[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
            case regularExpressionList = "RegularExpressionList"
            case scope = "Scope"
        }
    }

    public struct UpdateRegexPatternSetResponse: AWSDecodableShape {
        /// A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.
        public let nextLockToken: String?

        public init(nextLockToken: String? = nil) {
            self.nextLockToken = nextLockToken
        }

        private enum CodingKeys: String, CodingKey {
            case nextLockToken = "NextLockToken"
        }
    }

    public struct UpdateRuleGroupRequest: AWSEncodableShape {
        /// A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.  For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the  WAF Developer Guide.  For information about the limits on count and size for custom request and response settings, see WAF quotas in the  WAF Developer Guide.
        public let customResponseBodies: [String: CustomResponseBody]?
        /// A description of the rule group that helps with identification.
        public let description: String?
        /// A unique identifier for the rule group. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String
        /// The name of the rule group. You cannot change the name of a rule group after you create it.
        public let name: String
        /// The Rule statements used to identify the web requests that you  want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching   web requests, and parameters that govern how WAF handles them.
        public let rules: [Rule]?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// Defines and enables Amazon CloudWatch metrics and web request sample collection.
        public let visibilityConfig: VisibilityConfig

        public init(customResponseBodies: [String: CustomResponseBody]? = nil, description: String? = nil, id: String, lockToken: String, name: String, rules: [Rule]? = nil, scope: Scope, visibilityConfig: VisibilityConfig) {
            self.customResponseBodies = customResponseBodies
            self.description = description
            self.id = id
            self.lockToken = lockToken
            self.name = name
            self.rules = rules
            self.scope = scope
            self.visibilityConfig = visibilityConfig
        }

        public func validate(name: String) throws {
            try self.customResponseBodies?.forEach {
                try validate($0.key, name: "customResponseBodies.key", parent: name, max: 128)
                try validate($0.key, name: "customResponseBodies.key", parent: name, min: 1)
                try validate($0.key, name: "customResponseBodies.key", parent: name, pattern: "^[\\w\\-]+$")
                try $0.value.validate(name: "\(name).customResponseBodies[\"\($0.key)\"]")
            }
            try self.validate(self.customResponseBodies, name: "customResponseBodies", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\w+=:#@/\\-,\\.][\\w+=:#@/\\-,\\.\\s]+[\\w+=:#@/\\-,\\.]$")
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.lockToken, name: "lockToken", parent: name, max: 36)
            try self.validate(self.lockToken, name: "lockToken", parent: name, min: 1)
            try self.validate(self.lockToken, name: "lockToken", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.rules?.forEach {
                try $0.validate(name: "\(name).rules[]")
            }
            try self.visibilityConfig.validate(name: "\(name).visibilityConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case customResponseBodies = "CustomResponseBodies"
            case description = "Description"
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
            case rules = "Rules"
            case scope = "Scope"
            case visibilityConfig = "VisibilityConfig"
        }
    }

    public struct UpdateRuleGroupResponse: AWSDecodableShape {
        /// A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.
        public let nextLockToken: String?

        public init(nextLockToken: String? = nil) {
            self.nextLockToken = nextLockToken
        }

        private enum CodingKeys: String, CodingKey {
            case nextLockToken = "NextLockToken"
        }
    }

    public struct UpdateWebACLRequest: AWSEncodableShape {
        /// Specifies how WAF should handle CAPTCHA evaluations for rules that don't have their own CaptchaConfig settings. If you don't specify this, WAF uses its default settings for CaptchaConfig.
        public let captchaConfig: CaptchaConfig?
        /// Specifies how WAF should handle challenge evaluations for rules that don't have
        /// their own ChallengeConfig settings. If you don't specify this, WAF uses its default settings for ChallengeConfig.
        public let challengeConfig: ChallengeConfig?
        /// A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.  For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the  WAF Developer Guide.  For information about the limits on count and size for custom request and response settings, see WAF quotas in the  WAF Developer Guide.
        public let customResponseBodies: [String: CustomResponseBody]?
        /// The action to perform if none of the Rules contained in the WebACL match.
        public let defaultAction: DefaultAction
        /// A description of the web ACL that helps with identification.
        public let description: String?
        /// The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String
        /// The name of the web ACL. You cannot change the name of a web ACL after you create it.
        public let name: String
        /// The Rule statements used to identify the web requests that you  want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching   web requests, and parameters that govern how WAF handles them.
        public let rules: [Rule]?
        /// Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.   To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:    CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.    API and SDKs - For all calls, use the Region endpoint us-east-1.
        public let scope: Scope
        /// Specifies the domains that WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When WAF provides a token, it uses the domain of the Amazon Web Services resource that the web ACL is protecting. If you don't specify a list of token domains, WAF accepts tokens only for the domain of the protected resource. With a token domain list, WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains. Example JSON: "TokenDomains": { "mywebsite.com", "myotherwebsite.com" }  Public suffixes aren't allowed. For example, you can't use usa.gov or co.uk as token domains.
        public let tokenDomains: [String]?
        /// Defines and enables Amazon CloudWatch metrics and web request sample collection.
        public let visibilityConfig: VisibilityConfig

        public init(captchaConfig: CaptchaConfig? = nil, challengeConfig: ChallengeConfig? = nil, customResponseBodies: [String: CustomResponseBody]? = nil, defaultAction: DefaultAction, description: String? = nil, id: String, lockToken: String, name: String, rules: [Rule]? = nil, scope: Scope, tokenDomains: [String]? = nil, visibilityConfig: VisibilityConfig) {
            self.captchaConfig = captchaConfig
            self.challengeConfig = challengeConfig
            self.customResponseBodies = customResponseBodies
            self.defaultAction = defaultAction
            self.description = description
            self.id = id
            self.lockToken = lockToken
            self.name = name
            self.rules = rules
            self.scope = scope
            self.tokenDomains = tokenDomains
            self.visibilityConfig = visibilityConfig
        }

        public func validate(name: String) throws {
            try self.captchaConfig?.validate(name: "\(name).captchaConfig")
            try self.challengeConfig?.validate(name: "\(name).challengeConfig")
            try self.customResponseBodies?.forEach {
                try validate($0.key, name: "customResponseBodies.key", parent: name, max: 128)
                try validate($0.key, name: "customResponseBodies.key", parent: name, min: 1)
                try validate($0.key, name: "customResponseBodies.key", parent: name, pattern: "^[\\w\\-]+$")
                try $0.value.validate(name: "\(name).customResponseBodies[\"\($0.key)\"]")
            }
            try self.validate(self.customResponseBodies, name: "customResponseBodies", parent: name, min: 1)
            try self.defaultAction.validate(name: "\(name).defaultAction")
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\w+=:#@/\\-,\\.][\\w+=:#@/\\-,\\.\\s]+[\\w+=:#@/\\-,\\.]$")
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.lockToken, name: "lockToken", parent: name, max: 36)
            try self.validate(self.lockToken, name: "lockToken", parent: name, min: 1)
            try self.validate(self.lockToken, name: "lockToken", parent: name, pattern: "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\-]+$")
            try self.rules?.forEach {
                try $0.validate(name: "\(name).rules[]")
            }
            try self.tokenDomains?.forEach {
                try validate($0, name: "tokenDomains[]", parent: name, max: 253)
                try validate($0, name: "tokenDomains[]", parent: name, min: 1)
                try validate($0, name: "tokenDomains[]", parent: name, pattern: "^[\\w\\.\\-/]+$")
            }
            try self.validate(self.tokenDomains, name: "tokenDomains", parent: name, min: 1)
            try self.visibilityConfig.validate(name: "\(name).visibilityConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case captchaConfig = "CaptchaConfig"
            case challengeConfig = "ChallengeConfig"
            case customResponseBodies = "CustomResponseBodies"
            case defaultAction = "DefaultAction"
            case description = "Description"
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
            case rules = "Rules"
            case scope = "Scope"
            case tokenDomains = "TokenDomains"
            case visibilityConfig = "VisibilityConfig"
        }
    }

    public struct UpdateWebACLResponse: AWSDecodableShape {
        /// A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.
        public let nextLockToken: String?

        public init(nextLockToken: String? = nil) {
            self.nextLockToken = nextLockToken
        }

        private enum CodingKeys: String, CodingKey {
            case nextLockToken = "NextLockToken"
        }
    }

    public struct UriPath: AWSEncodableShape & AWSDecodableShape {
        public init() {}
    }

    public struct UsernameField: AWSEncodableShape & AWSDecodableShape {
        /// The name of the username field. For example /form/username.
        public let identifier: String

        public init(identifier: String) {
            self.identifier = identifier
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 512)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 1)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
        }
    }

    public struct VersionToPublish: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the vendor's rule group that's used in the published managed rule group version.
        public let associatedRuleGroupArn: String?
        /// The amount of time the vendor expects this version of the managed rule group to last, in days.
        public let forecastedLifetime: Int?

        public init(associatedRuleGroupArn: String? = nil, forecastedLifetime: Int? = nil) {
            self.associatedRuleGroupArn = associatedRuleGroupArn
            self.forecastedLifetime = forecastedLifetime
        }

        public func validate(name: String) throws {
            try self.validate(self.associatedRuleGroupArn, name: "associatedRuleGroupArn", parent: name, max: 2048)
            try self.validate(self.associatedRuleGroupArn, name: "associatedRuleGroupArn", parent: name, min: 20)
            try self.validate(self.associatedRuleGroupArn, name: "associatedRuleGroupArn", parent: name, pattern: "\\S")
            try self.validate(self.forecastedLifetime, name: "forecastedLifetime", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case associatedRuleGroupArn = "AssociatedRuleGroupArn"
            case forecastedLifetime = "ForecastedLifetime"
        }
    }

    public struct VisibilityConfig: AWSEncodableShape & AWSDecodableShape {
        /// A boolean indicating whether the associated resource sends metrics to Amazon CloudWatch. For the list of available metrics, see WAF Metrics.
        public let cloudWatchMetricsEnabled: Bool
        /// A name of the Amazon CloudWatch metric. The name can contain only the characters: A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 characters long. It can't contain whitespace or metric names reserved for WAF, for example All and Default_Action.
        public let metricName: String
        /// A boolean indicating whether WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the WAF console.
        public let sampledRequestsEnabled: Bool

        public init(cloudWatchMetricsEnabled: Bool, metricName: String, sampledRequestsEnabled: Bool) {
            self.cloudWatchMetricsEnabled = cloudWatchMetricsEnabled
            self.metricName = metricName
            self.sampledRequestsEnabled = sampledRequestsEnabled
        }

        public func validate(name: String) throws {
            try self.validate(self.metricName, name: "metricName", parent: name, max: 255)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[\\w#:\\.\\-/]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchMetricsEnabled = "CloudWatchMetricsEnabled"
            case metricName = "MetricName"
            case sampledRequestsEnabled = "SampledRequestsEnabled"
        }
    }

    public struct WebACL: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.
        public let arn: String
        /// The web ACL capacity units (WCUs) currently being used by this web ACL.  WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule.  Simple rules that cost little to run use fewer WCUs than more complex rules
        /// 				that use more processing power.
        /// 				Rule group capacity is fixed at creation, which helps users plan their   web ACL WCU usage when they use a rule group.  The WCU limit for web ACLs is 1,500.
        public let capacity: Int64?
        /// Specifies how WAF should handle CAPTCHA evaluations for rules that don't have their own CaptchaConfig settings. If you don't specify this, WAF uses its default settings for CaptchaConfig.
        public let captchaConfig: CaptchaConfig?
        /// Specifies how WAF should handle challenge evaluations for rules that don't have
        /// their own ChallengeConfig settings. If you don't specify this, WAF uses its default settings for ChallengeConfig.
        public let challengeConfig: ChallengeConfig?
        /// A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.  For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the  WAF Developer Guide.  For information about the limits on count and size for custom request and response settings, see WAF quotas in the  WAF Developer Guide.
        public let customResponseBodies: [String: CustomResponseBody]?
        /// The action to perform if none of the Rules contained in the WebACL match.
        public let defaultAction: DefaultAction
        /// A description of the web ACL that helps with identification.
        public let description: String?
        /// A unique identifier for the WebACL. This ID is returned in the responses to create and list commands. You use this ID to do things like get, update, and delete a WebACL.
        public let id: String
        /// The label namespace prefix for this web ACL. All labels added by rules in this web ACL have this prefix.    The syntax for the label namespace prefix for a web ACL is the following:   awswaf::webacl::    When a rule with a label matches a web request, WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon:   :
        public let labelNamespace: String?
        /// Indicates whether this web ACL is managed by Firewall Manager. If true, then only Firewall Manager can delete the web ACL or any Firewall Manager rule groups in the web ACL.
        public let managedByFirewallManager: Bool?
        /// The name of the web ACL. You cannot change the name of a web ACL after you create it.
        public let name: String
        /// The last set of rules for WAF to process in the web ACL. This is defined in an Firewall Manager WAF policy and contains only rule group references. You can't alter these. Any rules and rule groups that you define for the web ACL are prioritized before these.  In the Firewall Manager WAF policy, the Firewall Manager administrator can define a set of rule groups to run first in the web ACL and a set of rule groups to run last. Within each set, the administrator prioritizes the rule groups, to determine their relative processing order.
        public let postProcessFirewallManagerRuleGroups: [FirewallManagerRuleGroup]?
        /// The first set of rules for WAF to process in the web ACL. This is defined in an Firewall Manager WAF policy and contains only rule group references. You can't alter these. Any rules and rule groups that you define for the web ACL are prioritized after these.  In the Firewall Manager WAF policy, the Firewall Manager administrator can define a set of rule groups to run first in the web ACL and a set of rule groups to run last. Within each set, the administrator prioritizes the rule groups, to determine their relative processing order.
        public let preProcessFirewallManagerRuleGroups: [FirewallManagerRuleGroup]?
        /// The Rule statements used to identify the web requests that you  want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching   web requests, and parameters that govern how WAF handles them.
        public let rules: [Rule]?
        /// Specifies the domains that WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When WAF provides a token, it uses the domain of the Amazon Web Services resource that the web ACL is protecting. If you don't specify a list of token domains, WAF accepts tokens only for the domain of the protected resource. With a token domain list, WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.
        public let tokenDomains: [String]?
        /// Defines and enables Amazon CloudWatch metrics and web request sample collection.
        public let visibilityConfig: VisibilityConfig

        public init(arn: String, capacity: Int64? = nil, captchaConfig: CaptchaConfig? = nil, challengeConfig: ChallengeConfig? = nil, customResponseBodies: [String: CustomResponseBody]? = nil, defaultAction: DefaultAction, description: String? = nil, id: String, labelNamespace: String? = nil, managedByFirewallManager: Bool? = nil, name: String, postProcessFirewallManagerRuleGroups: [FirewallManagerRuleGroup]? = nil, preProcessFirewallManagerRuleGroups: [FirewallManagerRuleGroup]? = nil, rules: [Rule]? = nil, tokenDomains: [String]? = nil, visibilityConfig: VisibilityConfig) {
            self.arn = arn
            self.capacity = capacity
            self.captchaConfig = captchaConfig
            self.challengeConfig = challengeConfig
            self.customResponseBodies = customResponseBodies
            self.defaultAction = defaultAction
            self.description = description
            self.id = id
            self.labelNamespace = labelNamespace
            self.managedByFirewallManager = managedByFirewallManager
            self.name = name
            self.postProcessFirewallManagerRuleGroups = postProcessFirewallManagerRuleGroups
            self.preProcessFirewallManagerRuleGroups = preProcessFirewallManagerRuleGroups
            self.rules = rules
            self.tokenDomains = tokenDomains
            self.visibilityConfig = visibilityConfig
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case capacity = "Capacity"
            case captchaConfig = "CaptchaConfig"
            case challengeConfig = "ChallengeConfig"
            case customResponseBodies = "CustomResponseBodies"
            case defaultAction = "DefaultAction"
            case description = "Description"
            case id = "Id"
            case labelNamespace = "LabelNamespace"
            case managedByFirewallManager = "ManagedByFirewallManager"
            case name = "Name"
            case postProcessFirewallManagerRuleGroups = "PostProcessFirewallManagerRuleGroups"
            case preProcessFirewallManagerRuleGroups = "PreProcessFirewallManagerRuleGroups"
            case rules = "Rules"
            case tokenDomains = "TokenDomains"
            case visibilityConfig = "VisibilityConfig"
        }
    }

    public struct WebACLSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the entity.
        public let arn: String?
        /// A description of the web ACL that helps with identification.
        public let description: String?
        /// The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
        public let id: String?
        /// A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.
        public let lockToken: String?
        /// The name of the web ACL. You cannot change the name of a web ACL after you create it.
        public let name: String?

        public init(arn: String? = nil, description: String? = nil, id: String? = nil, lockToken: String? = nil, name: String? = nil) {
            self.arn = arn
            self.description = description
            self.id = id
            self.lockToken = lockToken
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case description = "Description"
            case id = "Id"
            case lockToken = "LockToken"
            case name = "Name"
        }
    }

    public struct XssMatchStatement: AWSEncodableShape & AWSDecodableShape {
        /// The part of the web request that you want WAF to inspect.
        public let fieldToMatch: FieldToMatch
        /// Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.  If you specify one or more transformations in a rule statement, WAF performs all transformations on the  content of the request component identified by FieldToMatch, starting from the lowest priority setting, before inspecting the content for a match.
        public let textTransformations: [TextTransformation]

        public init(fieldToMatch: FieldToMatch, textTransformations: [TextTransformation]) {
            self.fieldToMatch = fieldToMatch
            self.textTransformations = textTransformations
        }

        public func validate(name: String) throws {
            try self.fieldToMatch.validate(name: "\(name).fieldToMatch")
            try self.textTransformations.forEach {
                try $0.validate(name: "\(name).textTransformations[]")
            }
            try self.validate(self.textTransformations, name: "textTransformations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case fieldToMatch = "FieldToMatch"
            case textTransformations = "TextTransformations"
        }
    }
}

// MARK: - Errors

/// Error enum for WAFV2
public struct WAFV2ErrorType: AWSErrorType {
    enum Code: String {
        case wafAssociatedItemException = "WAFAssociatedItemException"
        case wafConfigurationWarningException = "WAFConfigurationWarningException"
        case wafDuplicateItemException = "WAFDuplicateItemException"
        case wafExpiredManagedRuleGroupVersionException = "WAFExpiredManagedRuleGroupVersionException"
        case wafInternalErrorException = "WAFInternalErrorException"
        case wafInvalidOperationException = "WAFInvalidOperationException"
        case wafInvalidParameterException = "WAFInvalidParameterException"
        case wafInvalidPermissionPolicyException = "WAFInvalidPermissionPolicyException"
        case wafInvalidResourceException = "WAFInvalidResourceException"
        case wafLimitsExceededException = "WAFLimitsExceededException"
        case wafLogDestinationPermissionIssueException = "WAFLogDestinationPermissionIssueException"
        case wafNonexistentItemException = "WAFNonexistentItemException"
        case wafOptimisticLockException = "WAFOptimisticLockException"
        case wafServiceLinkedRoleErrorException = "WAFServiceLinkedRoleErrorException"
        case wafSubscriptionNotFoundException = "WAFSubscriptionNotFoundException"
        case wafTagOperationException = "WAFTagOperationException"
        case wafTagOperationInternalErrorException = "WAFTagOperationInternalErrorException"
        case wafUnavailableEntityException = "WAFUnavailableEntityException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize WAFV2
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// WAF couldn’t perform the operation because your resource is being used by another resource or it’s associated with another resource.
    public static var wafAssociatedItemException: Self { .init(.wafAssociatedItemException) }
    /// The operation failed because you are inspecting the web request body, headers, or cookies without specifying how to handle oversize components. Rules that inspect the body must either provide an OversizeHandling configuration or they must be preceded by a SizeConstraintStatement that blocks the body content from being too large. Rules that inspect the headers or cookies must provide an OversizeHandling configuration.  Provide the handling configuration and retry your operation. Alternately, you can suppress this warning by adding the following tag to the resource that you provide to this operation: Tag (key:WAF:OversizeFieldsHandlingConstraintOptOut, value:true).
    public static var wafConfigurationWarningException: Self { .init(.wafConfigurationWarningException) }
    /// WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.
    public static var wafDuplicateItemException: Self { .init(.wafDuplicateItemException) }
    /// The operation failed because the specified version for the managed rule group has expired. You can retrieve the available versions for the managed rule group by calling ListAvailableManagedRuleGroupVersions.
    public static var wafExpiredManagedRuleGroupVersionException: Self { .init(.wafExpiredManagedRuleGroupVersionException) }
    /// Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
    public static var wafInternalErrorException: Self { .init(.wafInternalErrorException) }
    /// The operation isn&#39;t valid.
    public static var wafInvalidOperationException: Self { .init(.wafInvalidOperationException) }
    /// The operation failed because WAF didn&#39;t recognize a parameter in the request. For example:    You specified a parameter name or value that isn&#39;t valid.   Your nested statement isn&#39;t valid. You might have tried to nest a statement that can’t be nested.    You tried to update a WebACL with a DefaultAction that isn&#39;t among the types available at DefaultAction.   Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can&#39;t be associated.
    public static var wafInvalidParameterException: Self { .init(.wafInvalidParameterException) }
    /// The operation failed because the specified policy isn&#39;t in the proper format.  The policy specifications must conform to the following:   The policy must be composed using IAM Policy version 2012-10-17 or version 2015-01-01.   The policy must include specifications for Effect, Action, and Principal.    Effect must specify Allow.    Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and  wafv2:PutFirewallManagerRuleGroups and may optionally specify wafv2:GetRuleGroup.  WAF rejects any extra actions or wildcard actions in the policy.   The policy must not include a Resource parameter.   For more information, see IAM Policies.
    public static var wafInvalidPermissionPolicyException: Self { .init(.wafInvalidPermissionPolicyException) }
    /// WAF couldn’t perform the operation because the resource that you requested isn’t valid. Check the resource, and try again.
    public static var wafInvalidResourceException: Self { .init(.wafInvalidResourceException) }
    /// WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of WebACL objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide.
    public static var wafLimitsExceededException: Self { .init(.wafLimitsExceededException) }
    /// The operation failed because you don&#39;t have the permissions that your logging configuration requires. For information, see Logging web ACL traffic information in the WAF Developer Guide.
    public static var wafLogDestinationPermissionIssueException: Self { .init(.wafLogDestinationPermissionIssueException) }
    /// WAF couldn’t perform the operation because your resource doesn&#39;t exist.  If you&#39;ve just created a resource that you&#39;re using in this operation, you might  just need to wait a few minutes. It can take from a few seconds to a number of minutes  for changes to propagate.
    public static var wafNonexistentItemException: Self { .init(.wafNonexistentItemException) }
    /// WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
    public static var wafOptimisticLockException: Self { .init(.wafOptimisticLockException) }
    /// WAF is not able to access the service linked role. This can be caused by a previous PutLoggingConfiguration request, which can lock the service linked role for about 20 seconds. Please try your request again. The service linked role can also be locked by a previous DeleteServiceLinkedRole request, which can lock the role for 15 minutes or more. If you recently made a call to DeleteServiceLinkedRole, wait at least 15 minutes and try the request again. If you receive this same exception again, you will have to wait additional time until the role is unlocked.
    public static var wafServiceLinkedRoleErrorException: Self { .init(.wafServiceLinkedRoleErrorException) }
    /// You tried to use a managed rule group that&#39;s available by subscription, but you aren&#39;t subscribed to it yet.
    public static var wafSubscriptionNotFoundException: Self { .init(.wafSubscriptionNotFoundException) }
    /// An error occurred during the tagging operation. Retry your request.
    public static var wafTagOperationException: Self { .init(.wafTagOperationException) }
    /// WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
    public static var wafTagOperationInternalErrorException: Self { .init(.wafTagOperationInternalErrorException) }
    /// WAF couldn’t retrieve a resource that you specified for this operation.  If you&#39;ve just created a resource that you&#39;re using in this operation, you might  just need to wait a few minutes. It can take from a few seconds to a number of minutes  for changes to propagate. Verify the resources that you are specifying in your request  parameters and then retry the operation.
    public static var wafUnavailableEntityException: Self { .init(.wafUnavailableEntityException) }
}

extension WAFV2ErrorType: Equatable {
    public static func == (lhs: WAFV2ErrorType, rhs: WAFV2ErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension WAFV2ErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
